AddRuntimeMessage outside of the RunScript in GH_Python SDK


I am stuck. Cannot find a solution for adding a runtime message to a GH_Python component which will be compiled with the built-in compiler. I know that you can do AddRuntimeMessage using “self” and “component” but it seems to work only from the inside of the RunScript definition. Is there any trick to do it from outside of RunScript, to be specific from another function that belongs to the MyComponent class?

Thank you in advance!