def all_subclasses(cls):
    """Recursively find subclasses of a class.

    The subclasses should already be imported for this function to work properly.

    Args:
        cls (type): Class to inspect.

    Returns:
        set[type]: The set of subclasses.
    """
    return set(cls.__subclasses__()).union(
        [s for c in cls.__subclasses__() for s in all_subclasses(c)]
    )