@classmethod
def _get_subclasses(cls, clazz):
    """
    Finds all subclasses of the ``clazz``.
    """
    result = set()
    queue = [clazz]
    while queue:
        parent = queue.pop()
        for child in parent.__subclasses__():
            if child not in result:
                result.add(child)
                queue.append(child)
    return result
