code: def test_predict_openai(mock_openai_creds):
      client = get_deploy_client("openai")
      mock_resp = {
          "id": "chatcmpl-abc123",
          "object": "chat.completion",
          "created": 1677858242,
          "model": "gpt-3.5-turbo-0301",
          "usage": {
              "prompt_tokens": 13,
              "completion_tokens": 7,
              "total_tokens": 20,
          },
          "choices": [
              {
                  "message": {
                      "role": "assistant",
                      "content": "\n\nThis is a test!",
                  },
                  "finish_reason": "stop",
                  "index": 0,
              }
          ],
          "headers": {"Content-Type": "application/json"},
      }
      with mock.patch(
          "mlflow.openai.api_request_parallel_processor.process_api_requests",
          return_value=[mock_resp],
      ) as mock_request:
          resp = client.predict(
              endpoint="test",
              inputs={
                  "messages": [
                      {"role": "user", "content": "Hello!"},
                  ],
              },
          )
          mock_request.assert_called_once_with(
              [
                  {
                      "model": "test",
                      "messages": [
                          {"role": "user", "content": "Hello!"}
                      ],
                  }
              ],
              "https://api.openai.com/v1/chat/completions",
              api_token=mock.ANY,
              throw_original_error=mock.ANY,
              max_workers=1,
          )
          assert resp == mock_resp
  
file_path: mlflow/tests/deployments/openai/test_openai.py
imports: from unittest import mock
  import pytest
  from mlflow.deployments import get_deploy_client
  from mlflow.exceptions import MlflowException
label_desc: Use image node_id 5 for calling a global function with example usage: test_predict_openai(mock_openai_creds) without return types