from typing import Type


def prefix_name(cls: Type) -> str:
    """
    Returns the (lower cased) prefix before _superclass_'s name; e.g.
    (``BERTConverter`` becomes ``bert``).

    .. note::
    Only takes the first superclass into account in case of multiple
    inheritence.
    """
    return cls.__name__[:cls.__name__.find(cls.__bases__[0].__name__)].lower()