(cls, baseclass)
return classes
Return all intermediate classes in the OO hierarchy between a base 
    class and a child class.
Return all intermediate classes in the OO hierarchy between a base 
    class and a child class.
Return all intermediate classes in the OO hierarchy between a base class and a child class .
def get_intermediate_classes(cls, baseclass):
    """Return all intermediate classes in the OO hierarchy between a base 
    class and a child class."""
    classes = inspect.getmro(cls)
    classes = [c for c in classes if issubclass(c, baseclass)]
    return classes
def get_intermediate_classes ( cls , baseclass ) : classes = inspect . getmro ( cls ) classes = [ c for c in classes if issubclass ( c , baseclass ) ] return classes