def _fqdn(o, oset=True, recheck=False, pmodule=None):
if id(o) in _set_failures or o is None:<EOL><INDENT>return None<EOL><DEDENT>if recheck or not _safe_hasattr(o, "<STR_LIT>"):<EOL><INDENT>import inspect<EOL>if not hasattr(o, "<STR_LIT>"):<EOL><INDENT>msg.warn("<STR_LIT>".format(o), <NUM_LIT:3>)<EOL>return<EOL><DEDENT>result = None<EOL>if hasattr(o, "<STR_LIT>") and o.__acornext__ is not None:<EOL><INDENT>otarget = o.__acornext__<EOL><DEDENT>else:<EOL><INDENT>otarget = o<EOL><DEDENT>omod = _safe_getmodule(otarget) or pmodule<EOL>if (omod is None and hasattr(otarget, "<STR_LIT>") and<EOL>otarget.__objclass__ is not None): <EOL><INDENT>omod = _safe_getmodule(otarget.__objclass__)<EOL>parts = ("<STR_LIT>" if omod is None else omod.__name__,<EOL>otarget.__objclass__.__name__,<EOL>otarget.__name__)<EOL>result = "<STR_LIT>".format(*parts)<EOL><DEDENT>elif (omod is None and hasattr(otarget, "<STR_LIT>") and<EOL>otarget.__class__ is not None):<EOL><INDENT>omod = _safe_getmodule(otarget.__class__)<EOL>parts = ("<STR_LIT>" if omod is None else omod.__name__,<EOL>otarget.__class__.__name__,<EOL>otarget.__name__)<EOL>result = "<STR_LIT>".format(*parts)<EOL><DEDENT>elif omod is not otarget:<EOL><INDENT>parts = (_fqdn(omod, False), otarget.__name__)<EOL>result = "<STR_LIT>".format(*parts)<EOL><DEDENT>else:<EOL><INDENT>result = otarget.__name__<EOL><DEDENT>if oset:<EOL><INDENT>_safe_setattr(o, "<STR_LIT>", result)<EOL><DEDENT>return result<EOL><DEDENT>if _safe_hasattr(o, "<STR_LIT>"):<EOL><INDENT>return o.__fqdn__<EOL><DEDENT>
Returns the fully qualified name of the object.

    Args:
        o (type): instance of the object's type.
        oset (bool): when True, the fqdn will also be set on the object as attribute
          `__fqdn__`.
        recheck (bool): for sub-classes, sometimes the super class has already had
          its __fqdn__ attribute set; in that case, we want to recheck the
          object's name. This usually only gets used during object extension.