def METHOD_NAME(code: str) -> TokenResponse:
    """
    https://docs.feide.no/service_providers/openid_connect/feide_obtaining_tokens.html
    """
    params = {
        "code": code,
        "grant_type": "authorization_code",
        "redirect_uri": settings.DATAPORTEN_REDIRECT_URI,
        "client_id": CLIENT_ID,
    }
    try:
        response = requests.post(
            "https://auth.dataporten.no/oauth/token",
            params,
            auth=HTTPBasicAuth(
                CLIENT_ID,
                settings.DATAPORTEN_SECRET,
            ),
        )
        # Raises exceptions upon HTTP errors
        response.raise_for_status()
    except requests.exceptions.RequestException:
        raise RuntimeError("En feil oppstod under fullføring av Dataporten-autentisering.")
    return response.json()