@staticmethod
def get_self_reference_from_args(*args: Any) -> Optional[Any]:
    "\n        Useful in decorators:\n        being able to call the internal method by getting\n        the 'self' reference from the decorated method\n        (when it's there)\n        "
    if (len(args) > 0):
        candidate_as_self = args[0]
        cls_attribute = getattr(candidate_as_self, '__class__', None)
        if ((cls_attribute is not None) and inspect.isclass(cls_attribute)):
            return args[0]
    return None
Useful in decorators:
being able to call the internal method by getting
the 'self' reference from the decorated method
(when it's there)
@staticmethod
def get_self_reference_from_args(*args: Any) -> Optional[Any]:
    "\n        Useful in decorators:\n        being able to call the internal method by getting\n        the 'self' reference from the decorated method\n        (when it's there)\n        "
    if (len(args) > 0):
        candidate_as_self = args[0]
        cls_attribute = getattr(candidate_as_self, '__class__', None)
        if ((cls_attribute is not None) and inspect.isclass(cls_attribute)):
            return args[0]
    return None