code: def test_score_model_endpoints_chat(
      set_deployment_envs, endpoint_type_key
  ):
      openai_response_format = {
          "id": "chatcmpl-123",
          "object": "chat.completion",
          "created": 1677652288,
          "model": "gpt-3.5-turbo-0613",
          "system_fingerprint": "fp_44709d6fcb",
          "choices": [
              {
                  "index": 0,
                  "message": {
                      "role": "assistant",
                      "content": "\n\nHello there, how may I assist you today?",
                  },
                  "finish_reason": "stop",
              }
          ],
          "usage": {
              "prompt_tokens": 9,
              "completion_tokens": 12,
              "total_tokens": 21,
          },
      }
      expected_output = {
          "choices": [
              {
                  "index": 0,
                  "message": {
                      "role": "assistant",
                      "content": "\n\nHello there, how may I assist you today?",
                  },
                  "finish_reason": "stop",
              }
          ],
      }
  
      with mock.patch(
          "mlflow.deployments.get_deploy_client"
      ) as mock_get_deploy_client:
          mock_client = mock.MagicMock()
          mock_get_deploy_client.return_value = mock_client
          # mock out mock_client.get_endpoint() to return chat
          mock_client.get_endpoint.return_value = {
              endpoint_type_key: "llm/v1/chat",
          }
          # mock out mock_client.predict() to return expected_output
          mock_client.predict.return_value = openai_response_format
          response = score_model_on_payload(
              "endpoints:/my-endpoint",
              {"prompt": "my prompt", "temperature": 0.1},
          )
          assert (
              response
              == expected_output["choices"][0]["message"]["content"]
          )
  
imports: from unittest import mock
  import pytest
  from mlflow.exceptions import MlflowException
  from mlflow.gateway.config import Route, RouteModelInfo
  from mlflow.metrics.genai.model_utils import _parse_model_uri, score_model_on_payload
label_desc: Use image node_id 16 for calling a global function with example usage: test_score_model_endpoints_chat(set_deployment_envs, endpoint_type_key) without return types