code: def test_score_model_endpoints_completions(
      set_deployment_envs, endpoint_type_key
  ):
      openai_response_format = {
          "id": "cmpl-8PgdiXapPWBN3pyUuHcELH766QgqK",
          "object": "text_completion",
          "created": 1701132798,
          "model": "gpt-3.5-turbo-instruct",
          "choices": [
              {
                  "text": "\n\nHi there! How can I assist you today?",
                  "index": 0,
                  "finish_reason": "stop",
              },
          ],
          "usage": {
              "prompt_tokens": 2,
              "completion_tokens": 106,
              "total_tokens": 108,
          },
      }
  
      expected_output = {
          "choices": [
              {
                  "text": "\n\nHi there! How can I assist you today?",
                  "index": 0,
                  "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 completions
          mock_client.get_endpoint.return_value = {
              endpoint_type_key: "llm/v1/completions",
          }
          # 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]["text"]
  
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 17 for calling a global function with example usage: test_score_model_endpoints_completions(set_deployment_envs, endpoint_type_key) without return types