def qualified_name(obj):
try:<EOL><INDENT>module = obj.__module__<EOL>qualname = obj.__qualname__<EOL><DEDENT>except AttributeError:<EOL><INDENT>type_ = type(obj)<EOL>module = type_.__module__<EOL>qualname = type_.__qualname__<EOL><DEDENT>return qualname if module in ('<STR_LIT>', '<STR_LIT>') else '<STR_LIT>'.format(module, qualname)<EOL>
Return the qualified name (e.g. package.module.Type) for the given object.