def all_subclasses(cls: Any) -> List[Any]:
    'Returns all known (imported) subclasses of a class.'
    classes = (cls.__subclasses__() + [g for s in cls.__subclasses__() for g in all_subclasses(s)])
    return [subclass for subclass in classes if (not inspect.isabstract(subclass))]
Returns all known (imported) subclasses of a class.
def all_subclasses(cls: Any) -> List[Any]:
    
    classes = (cls.__subclasses__() + [g for s in cls.__subclasses__() for g in all_subclasses(s)])
    return [subclass for subclass in classes if (not inspect.isabstract(subclass))]