Calling python class instance

How can I call an external modules inside a DAT, as if that module ran inside the DAT? The example here prints: “myNameClass”
… But I would really want it to print:
“this_name”
The goal is to externalize a logging/debugging function that gets called by many DATs without passing any arguments.

I think the best you could do would be to simplify passing in an argument.

In /whatever/local/modules/logger DAT:

def log(context, ....):
   print(context.path + ....)

and then call it like this:

mod.logger.log(me, .....)

or do it with an extension class on a COMP with a global shortcut:

op.Logger.Log(me, ...)

That doesn’t require that much boilerplate.
In general, I try to avoid using implicit context-defined things like me except for passing them over to some function that accepts that as a parameter. Otherwise the logic around what me means in any given context can get confusing.