code: def name_for(obj):
      
      if isinstance(obj, str):
          return obj
  
      cls = obj if isclass(obj) else obj.__class__
  
      if hasattr(cls, "__alias__"):
          return underscore(cls.__alias__)
      else:
          return underscore(cls.__name__)
docs: Get a name for something.
  
      Allows overriding of default names using the `__alias__` attribute.