def get_wrapped_class(wrapped):
    'Determine the command class a wrapped __call__ belongs to'
    mod = sys.modules[wrapped.__module__]
    command_class_name = wrapped.__qualname__.split('.')[(- 2)]
    _func_class = mod.__dict__[command_class_name]
    lgr.debug('Determined class of decorated function: %s', _func_class)
    return _func_class
Determine the command class a wrapped __call__ belongs to
def get_wrapped_class(wrapped):
    
    mod = sys.modules[wrapped.__module__]
    command_class_name = wrapped.__qualname__.split('.')[(- 2)]
    _func_class = mod.__dict__[command_class_name]
    lgr.debug('Determined class of decorated function: %s', _func_class)
    return _func_class