code: def test_validate_auth_returns_unauthorized_for_invalid_jwt_token(
      bot_framework_input: BotFrameworkInput,
      rsa_private_key: RSAPrivateKey,
      caplog: LogCaptureFixture,
  ):
      encoded = jwt.encode(
          {
              "serviceurl": "https://webchat.botframework.com/",
              "nbf": int(time.time()) + DAY_IN_SECONDS,
              "exp": int(time.time()) + 2 * DAY_IN_SECONDS,
              "iss": "https://api.botframework.com",
              "aud": "app_id",
          },
          rsa_private_key,
          algorithm="RS256",
          headers={"kid": "key_id", "alg": "RS256"},
      )
  
      resp = bot_framework_input._validate_auth(f"Bearer {encoded}")
  
      assert resp is not None
      assert resp.status == HTTPStatus.UNAUTHORIZED
      assert resp.body.decode() == "Could not validate JWT token."
      assert [msg for msg in caplog.messages] == [
          "Bot framework JWT token could not be verified.",
          "The token is not yet valid (nbf)",
      ]
  
imports: import json
  import time
  from http import HTTPStatus
  from unittest import mock
  from unittest.mock import Mock
  import freezegun
  import jwt
  import pytest
  from _pytest.logging import LogCaptureFixture
  from cryptography.hazmat.primitives.asymmetric import rsa
  from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateKey
  from jwt.algorithms import RSAAlgorithm
  from rasa.core.channels import BotFrameworkInput
label_desc: Use image node_id 5 for calling a global function with example usage: test_validate_auth_returns_unauthorized_for_invalid_jwt_token(bot_framework_input, rsa_private_key, caplog) without return types