(callable_obj: UserListener)
return obj_name, module
Get "ID" of a callable, in the form of its name and module in which it is defined
    E.g. getID(Foo.bar) returns ('Foo.bar', 'a.b') if Foo.bar was defined in module a.b.
    :param callable_obj: a callable, ie function, bound method or callable instance
Get "ID" of a callable, in the form of its name and module in which it is defined
    E.g. getID(Foo.bar) returns ('Foo.bar', 'a.b') if Foo.bar was defined in module a.b.
    :param callable_obj: a callable, ie function, bound method or callable instance
Get ID of a callable in the form of its name and module in which it is defined E . g . getID ( Foo . bar ) returns ( Foo . bar a . b ) if Foo . bar was defined in module a . b . : param callable_obj : a callable ie function bound method or callable instance
def getID(callable_obj: UserListener) -> Tuple[str, ModuleType]:
    """
    Get "ID" of a callable, in the form of its name and module in which it is defined
    E.g. getID(Foo.bar) returns ('Foo.bar', 'a.b') if Foo.bar was defined in module a.b.
    :param callable_obj: a callable, ie function, bound method or callable instance
    """
    sc = callable_obj
    if ismethod(sc):
        module = getModule(sc.__self__)
        obj_name = '%s.%s' % (sc.__self__.__class__.__name__, sc.__func__.__name__)
    elif isfunction(sc):
        module = getModule(sc)
        obj_name = sc.__name__
    else:  # must be a functor (instance of a class that has __call__ method)
        module = getModule(sc)
        obj_name = sc.__class__.__name__

    return obj_name, module
def getID ( callable_obj : UserListener ) -> Tuple [ str , ModuleType ] : sc = callable_obj if ismethod ( sc ) : module = getModule ( sc . __self__ ) obj_name = '%s.%s' % ( sc . __self__ . __class__ . __name__ , sc . __func__ . __name__ ) elif isfunction ( sc ) : module = getModule ( sc ) obj_name = sc . __name__ else : # must be a functor (instance of a class that has __call__ method) module = getModule ( sc ) obj_name = sc . __class__ . __name__ return obj_name , module