from typing import Type
from typing import Iterable


def _mro(type_: Type) -> Iterable[type]:
    """Fetch the MRO for a type."""
    # The MRO is calculated at class creation time and set to `__mro__`.
    # https://github.com/python/cpython/blob/v3.8.3/Objects/typeobject.c#L5338
    # The `mro()` method is only called during creation in case a type overrides
    # MRO calculation.
    return type_.__mro__