def METHOD_NAME(token_response: TokenResponse):
    """
    https://docs.feide.no/reference/oauth_oidc/openid_connect_details.html
    """
    id_token = token_response["id_token"]
    # Collect available public keys, mapping each key's ID to its parsed representation
    try:
        response = requests.get("https://auth.dataporten.no/openid/jwks")
        response.raise_for_status()
        jwks = response.json()
    except requests.exceptions.RequestException:
        raise RuntimeError("En systemfeil oppstod under validering av brukeren.")
    public_keys = {}
    for jwk in jwks["keys"]:
        kid = jwk["kid"]
        public_keys[kid] = jwt.algorithms.RSAAlgorithm.from_jwk(json.dumps(jwk))
    # look up the public key corresponding to the private key with which the token was signed
    kid = jwt.get_unverified_header(id_token)["kid"]
    key = public_keys[kid]
    try:
        jwt.decode(
            id_token,
            key=key,
            algorithms=["RS256"],
            issuer="https://auth.dataporten.no",
            audience=CLIENT_ID,
        )
    except jwt.PyJWTError:
        raise ValidationError("Kunne ikke validere brukeren.")