def get_type_info(obj):
if isinstance(obj, primitive_types):<EOL><INDENT>return ('<STR_LIT>', type(obj).__name__)<EOL><DEDENT>if isinstance(obj, sequence_types):<EOL><INDENT>return ('<STR_LIT>', type(obj).__name__)<EOL><DEDENT>if isinstance(obj, array_types):<EOL><INDENT>return ('<STR_LIT>', type(obj).__name__)<EOL><DEDENT>if isinstance(obj, key_value_types):<EOL><INDENT>return ('<STR_LIT>', type(obj).__name__)<EOL><DEDENT>if isinstance(obj, types.ModuleType):<EOL><INDENT>return ('<STR_LIT>', type(obj).__name__)<EOL><DEDENT>if isinstance(obj, (types.FunctionType, types.MethodType)):<EOL><INDENT>return ('<STR_LIT>', type(obj).__name__)<EOL><DEDENT>if isinstance(obj, type):<EOL><INDENT>if hasattr(obj, '<STR_LIT>'):<EOL><INDENT>return ('<STR_LIT:class>', obj.__name__)<EOL><DEDENT><DEDENT>if isinstance(type(obj), type):<EOL><INDENT>if hasattr(obj, '<STR_LIT>'):<EOL><INDENT>cls_name = type(obj).__name__<EOL>if cls_name == '<STR_LIT>':<EOL><INDENT>cls_name = obj.__name__<EOL>return ('<STR_LIT:class>', '<STR_LIT:{}>'.format(cls_name))<EOL><DEDENT>if cls_name == '<STR_LIT>':<EOL><INDENT>cls_name = obj.__class__.__name__<EOL><DEDENT>return ('<STR_LIT>', '<STR_LIT>'.format(cls_name))<EOL><DEDENT><DEDENT>return ('<STR_LIT>', type(obj).__name__)<EOL>
Get type information for a Python object

    Args:
        obj: The Python object

    Returns:
        tuple: (object type "catagory", object type name)