code: def get_type_info(t):
      if hasattr(t, "__type_info__"):
          ret = t.__type_info__()
          assert ret.python_class is not None
          return ret
      elif isinstance(t, type):
          return Type(t.__name__, python_class=t)
      elif hasattr(t, "__call__"):
          return get_python_method_type(t)
      raise TypeError("Unsupported type %s" % t)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/mil/types/get_type_info.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from .type_spec import *
  from .type_void import void
label_desc: Use image node_id 2 for calling a global function with example usage: get_type_info(t) and returns: ret, Type, get_python_method_type