docs: def qualname(thing):
      """Return the dot name for a given thing.
  
      >>> import everett.manager
      >>> qualname(str)
      'str'
      >>> qualname(everett.manager.parse_class)
      'everett.manager.parse_class'
      >>> qualname(everett.manager)
      'everett.manager'
  
      """
      parts = []
  
      # Add the module, unless it's a builtin
      mod = inspect.getmodule(thing)
      if mod and mod.__name__ not in ('__main__', '__builtin__', 'builtins'):
          parts.append(mod.__name__)
  
      # If there's a __qualname__, use that
      if hasattr(thing, '__qualname__'):
          parts.append(thing.__qualname__)
          return '.'.join(parts)
  
      # If it's a module
      if inspect.ismodule(thing):
          return '.'.join(parts)
  
      # If it's a class
      if inspect.isclass(thing):
          parts.append(thing.__name__)
          return '.'.join(parts)
  
      # If it's a function
      if isinstance(thing, (types.FunctionType, types.MethodType)):
          # If it's a method or function
          if inspect.ismethod(thing):
              if thing.im_class is type:
                  # This is a class method
                  parts.append(thing.im_self.__name__)
              else:
                  # This is an bound/instance method
                  parts.append(thing.im_class.__name__)
              parts.append(thing.__name__)
  
          elif inspect.isfunction(thing):
              parts.append(thing.__name__)
  
          return '.'.join(parts)
  
      # It's an instance, so ... let's call repr on it
      return repr(thing)