code: def subclasses(cls, lst=None):
      '''Recursively gather subclasses of cls.
      '''
      if lst is None:
          lst = []
      for sc in cls.__subclasses__():
          if sc not in lst:
              lst.append(sc)
          subclasses(sc, lst=lst)
      return lsf subclasses(cls, lst=None):
      '''Recursively gather subclasses of cls.
      '''
      if lst is None:
          lst = []
      for sc in cls.__subclasses__():
          if sc not in lst:
              lst.append(sc)
          subclasses(sc, lst=lst)
      return lst
docs: Recursively gather subclasses of cls.