def super_class(cls):
    """Return the next class in the MRO of cls, or object."""
    mro = cls.__mro__
    assert len(mro) > 0
    if len(mro) == 1:
        assert mro[0] is object
        return object
    return mro[1]
