Custom Global Function / Top-Level Function

Hello everybody,

We all know that we can use the trace function through our code irrespective of the timeline code or say any custom class.

I am curious, is that possible that we could create a custom global function or top-level function, which would be available throughout the custom classes in given project.

Could anyone share/guide how to achieve this, there might be some way or the other.

Humble Regards,
Scripting Gringo