def METHOD_NAME(user_uuid, scopes: list, amr: str = None):
    """Build a proper auth token with desired scopes."""
    audience = api_token_auth_settings.AUDIENCE
    issuer = api_token_auth_settings.ISSUER
    auth_field = api_token_auth_settings.API_AUTHORIZATION_FIELD
    config_url = f"{issuer}/.well-known/openid-configuration"
    jwks_url = f"{issuer}/jwks"
    configuration = {
        "issuer": issuer,
        "jwks_uri": jwks_url,
    }
    keys = {"keys": [rsa_key.public_key_jwk]}
    now = datetime.datetime.now()
    expire = now + datetime.timedelta(days=14)
    jwt_data = {
        "iss": issuer,
        "aud": audience,
        "sub": str(user_uuid),
        "iat": int(now.timestamp()),
        "exp": int(expire.timestamp()),
        "amr": amr if amr else "github",
        auth_field: scopes,
    }
    encoded_jwt = jwt.encode(
        jwt_data, key=rsa_key.private_key_pem, algorithm=rsa_key.jose_algorithm
    )
    req_mock.get(config_url, json=configuration)
    req_mock.get(jwks_url, json=keys)
    auth_header = f"{api_token_auth_settings.AUTH_SCHEME} {encoded_jwt}"
    return auth_header