code: def _flatten_subclass_tree(cls):
      
      subclasses = frozenset(cls.__subclasses__())
      children = frozenset(toolz.concat(map(_flatten_subclass_tree, subclasses)))
      return frozenset({cls}) | subclasses | children
docs: Return the set of all child classes of `cls`.
  
      Parameters
      ----------
      cls : Type
  
      Returns
      -------
      frozenset[Type]