def _all_classes(self, classes):
        all_classes = {}

        def recurse(cls):
            all_classes[cls] = None
            for c in cls.__bases__:
                if c not in all_classes:
                    recurse(c)

        for cls in classes:
            recurse(cls)

        return list(all_classes.keys())
Return a list of all classes that are ancestors of *classes*.
dataset/ETHPy150Open ipython/ipython-py3k/docs/sphinxext/inheritance_diagram.py/InheritanceGraph._all_classes