class_docstr: Metaclass for defining Abstract Base Classes (ABCs).
  
  Use this metaclass to create an ABC.  An ABC can be subclassed
  directly, and then acts as a mix-in class.  You can also register
  unrelated concrete classes (even built-in classes) and unrelated
  ABCs as 'virtual subclasses' -- these and their descendants will
  be considered subclasses of the registering ABC by the built-in
  issubclass() function, but the registering ABC won't show up in
  their MRO (Method Resolution Order) nor will method
  implementations defined by the registering ABC be callable (not
  even via super()).
class_docstr_tok: ["Metaclass","for","defining","Abstract","Base","Classes","(","ABCs",")",".","Use","this","metaclass","to","create","an","ABC",".","An","ABC","can","be","subclassed","directly",",","and","then","acts","as","a","mix-in","class",".","You","can","also","register","unrelated","concrete","classes","(","even","built-in","classes",")","and","unrelated","ABCs","as","'virtual","subclasses","'","--","these","and","their","descendants","will","be","considered","subclasses","of","the","registering","ABC","by","the","built-in","issubclass","(",")","function",",","but","the","registering","ABC","wo","n't","show","up","in","their","MRO","(","Method","Resolution","Order",")","nor","will","method","implementations","defined","by","the","registering","ABC","be","callable","(","not","even","via","super","(",")",")","."]
docstr: Debug helper to print the ABC registry.
docstr_tok: ["Debug","helper","to","print","the","ABC","registry","."]
code: def _dump_registry(cls, file=None):
      """Debug helper to print the ABC registry."""
      print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file)
      print(f"Inv. counter: {get_cache_token()}", file=file)
      for name in cls.__dict__:
          if name.startswith("_abc_"):
              value = getattr(cls, name)
              if isinstance(value, WeakSet):
                  value = set(value)
              print(f"{name}: {value!r}", file=file)
  
file_path: cpython/Lib/_py_abc.py
imports: from _weakrefset import WeakSet
label_desc: Use image node_id 3 for calling the ABCMeta obj's underlying member method code with example usage: obj._dump_registry(cls, file) without return types