def METHOD_NAME(identity_key, id_type, *, session: "Session"):
    """
    Returns the default account for this identity.
    :param identity_key: The identity key name. For example x509 DN, or a username.
    :param id_type: The type of the authentication (x509, gss, userpass, ssh, saml).
    :param session: The database session in use.
    """
    account = identity.METHOD_NAME(identity_key, IdentityType[id_type.upper()], session=session)
    return account.external