def METHOD_NAME(dao, config):
    profile = {
        "id": 1234,
        "login": "wolfv",
        "name": "wolfv",
        "avatar_url": "url",
        "emails": [
            {"email": "w.vollprecht@abcdef.com", "verified": True, "primary": True},
            {
                "email": "wolf.vollprecht@lasersight.net",
                "verified": True,
                "primary": False,
            },
        ],
    }
    provider = "github"
    profile2 = {
        "id": 1234,
        "login": "gitlab_wolfv",
        "name": "Wolf Vollprecht",
        "avatar_url": "url",
        "emails": [
            {
                "email": "wolf.vollprecht@lasersight.net",
                "verified": True,
                "primary": False,
            },
        ],
    }
    provider2 = "gitlab"
    user = auth_dao.get_user_by_identity(
        dao, provider=provider, profile=profile, config=config
    )
    assert user.username == "wolfv"
    e = find_email(user.emails, "w.vollprecht@abcdef.com")
    assert e.email == "w.vollprecht@abcdef.com"
    assert len(user.emails) == 2
    assert e.verified is True
    assert e.primary is True
    with pytest.raises(ValidationError):
        user = auth_dao.get_user_by_identity(
            dao, provider=provider2, profile=profile2, config=config
        )