code: def gen_all_subclasses(cls: Type) -> Generator[Type, None, None]:
      
  
      for s1 in cls.__subclasses__():
          yield s1
          for s2 in gen_all_subclasses(s1):
              yield s2
docs: Generates all subclasses of a class.
  
      Args:
          cls: a class
  
      Yields:
          all subclasses