How to calculate pillar size with aspect ratio keep

Godot Version

4.2.2

Question

In my 2D-game im using stretch mode canvas_item and aspect ratio keep. To position an element in an full screen Android overlay, i need to know to size of the letterbox / pillars (the black area) if the window aspect ratio does not match the screen aspect ratio.