def METHOD_NAME(cls, identity: IdentityType, status: Status) -> UserIdentityConfig:
    def base(**kwargs):
        return cls(
            category=_IDENTITY_CATEGORY_KEYS[type(identity)],
            id=identity.id,
            status=status,
            **kwargs,
        )
    if isinstance(identity, UserSocialAuth):
        return base(
            provider=UserIdentityProvider(
                identity.provider, user_social_auth.get_provider_label(identity)
            ),
            name=identity.uid,
            is_login=False,
        )
    elif isinstance(identity, Identity):
        try:
            provider = identity.get_provider()
        except NotRegistered:
            provider = sentry.integrations.get(identity.idp.type)
        return base(
            provider=UserIdentityProvider.adapt(provider),
            name=identity.external_id,
            is_login=supports_login(identity),
            date_added=identity.date_added,
            date_verified=identity.date_verified,
        )
    elif isinstance(identity, AuthIdentity):
        return base(
            provider=UserIdentityProvider.adapt(identity.auth_provider.get_provider()),
            name=identity.ident,
            is_login=True,
            organization_id=identity.auth_provider.organization_id,
            date_added=identity.date_added,
            date_verified=identity.last_verified,
            date_synced=identity.last_synced,
        )
    else:
        raise TypeError