def _get_mro(obj_class):
    """Get a reasonable method resolution order of a class and its superclasses
    for both old-style and new-style classes."""
    if not hasattr(obj_class, '__mro__'):
        try:
            obj_class = type(obj_class.__name__, (obj_class, object), {})
        except TypeError:
            mro = [obj_class]
        else:
            mro = obj_class.__mro__[1:-1]
    else:
        mro = obj_class.__mro__
    return mro
