def get_all_subclasses(cls):
    """
    Get all subclasses of a given class. Note that the results will depend on current imports.

    :param cls: a class.
    :return: the set of all subclasses.
    """
    return set(cls.__subclasses__()).union(
        [s for c in cls.__subclasses__() for s in get_all_subclasses(c)])