def factory(name, Base, Deriveds):
    """Find the base or derived class by registered name.

    Parameters
    ----------
    Base: class
        Start the lookup here.
    Deriveds: iterable of (name, class)
        A list of derived classes with their names.

    Returns
    -------
    class
    """

    Derived = Base
    for (nm, NmCl) in Deriveds:
        if nm == name:
            Derived = NmCl
            break

    return Derived