Draw principal axes

Hi,
Thanks for the suggestion given above. I found the Python code and I believe I should change some string names. However, I am not sure with what name I can call the principal axes.
For example: what should I put instead of obb_direction_ras_x within "LabelmapSegmentStatisticsPlugin.obb_direction_ras_x" to obtain the principal x axes?

In the end I would like to obtain a figure as in this post, in the Principal axes and moments figure.

Thanks in advance!