class_docstr: Creates class that automatically registers all subclasses
  
  To prevent the base class from showing up in the registry,
  it should inherit from ABC. This metaclass uses a single
  dictionary to register all types of subclasses.
  
  To access the registered objects, use:
  
      obj = Registry['name']
  
  To explicitly register objects
  
      Registry['name'] = obj
  
  Notes
  -----
  When objects are deleted, they are automatically removed
  from the Registry.
class_docstr_tok: ["Creates","class","that","automatically","registers","all","subclasses","To","prevent","the","base","class","from","showing","up","in","the","registry",",","it","should","inherit","from","ABC",".","This","metaclass","uses","a","single","dictionary","to","register","all","types","of","subclasses",".","To","access","the","registered","objects",",","use",":","obj","=","Registry","[","'name","'","]","To","explicitly","register","objects","Registry","[","'name","'","]","=","obj","Notes","--","--","-","When","objects","are","deleted",",","they","are","automatically","removed","from","the","Registry","."]
code: def __new__(cls, name, bases, namespace):
      sub_cls = super().__new__(cls, name, bases, namespace)
      is_base_class = len(bases) and bases[0].__name__ == "ABC"
      if not is_base_class:
          # A sub_cls is an alias of a base class if it has
          # alias as the second base class
          if len(bases) == 2 and bases[1] is alias:
              sub_cls = bases[0]
          Registry[name] = sub_cls
      return sub_cls
  
file_path: plotnine/plotnine/_utils/registry.py
imports: from __future__ import annotations
  from abc import ABCMeta
  from collections import defaultdict
  from weakref import WeakValueDictionary
  from ..exceptions import PlotnineError
label_desc: Use image node_id 1 for calling the Register obj's underlying member method code with example usage: obj.__new__(cls, name, bases, namespace) and returns: sub_cls