docs: def name_from_type(type_):
      # type: (InternalType) -> str
      """
      Helper function to get PEP-484 compatible string representation of our internal types.
      """
      if isinstance(type_, (DictType, ListType, TupleType, SetType, IteratorType)):
          return repr(type_)
      else:
          if type_.__name__ != 'NoneType':
              module = type_.__module__
              if module in BUILTIN_MODULES or module == '<unknown>':
                  # Omit module prefix for known built-ins, for convenience. This
                  # makes unit tests for this module simpler.
                  # Also ignore '<uknown>' modules so pyannotate can parse these types
                  return type_.__name__
              else:
                  name = getattr(type_, '__qualname__', None) or type_.__name__
                  delim = '.' if '.' not in name else ':'
                  return '%s%s%s' % (module, delim, name)
          else:
              return 'None'