def METHOD_NAME(carrier):
    from karrio.server.providers.models import MODELS
    return next(
        (
            (name, getattr(carrier, model.__name__.lower()))
            for name, model in MODELS.items()
            if hasattr(carrier, model.__name__.lower())
        ),
        (None, None),
    )