code: def test_predict():
      client = get_deploy_client("http://localhost:5000")
      mock_resp = mock.Mock()
      mock_resp.json.return_value = {
          "id": "chatcmpl-123",
          "object": "chat.completion",
          "created": 1677652288,
          "model": "gpt-3.5-turbo-0613",
          "choices": [
              {
                  "index": 0,
                  "message": {
                      "role": "assistant",
                      "content": "hello",
                  },
                  "finish_reason": "stop",
              }
          ],
          "usage": {
              "prompt_tokens": 9,
              "completion_tokens": 12,
              "total_tokens": 21,
          },
      }
  
      mock_resp.status_code = 200
      with mock.patch(
          "requests.Session.request", return_value=mock_resp
      ) as mock_request:
          resp = client.predict(endpoint="test", inputs={})
          mock_request.assert_called_once()
          assert resp == {
              "id": "chatcmpl-123",
              "object": "chat.completion",
              "created": 1677652288,
              "model": "gpt-3.5-turbo-0613",
              "choices": [
                  {
                      "index": 0,
                      "message": {
                          "role": "assistant",
                          "content": "hello",
                      },
                      "finish_reason": "stop",
                  }
              ],
              "usage": {
                  "prompt_tokens": 9,
                  "completion_tokens": 12,
                  "total_tokens": 21,
              },
          }
          ((_, url), _) = mock_request.call_args
          assert (
              url == "http://localhost:5000/endpoints/test/invocations"
          )
  
file_path: mlflow/tests/deployments/mlflow/test_mlflow.py
imports: from unittest import mock
  import pytest
  from mlflow.deployments import get_deploy_client
  from mlflow.deployments.mlflow import MlflowDeploymentClient
label_desc: Use image node_id 8 for calling a global function with example usage: test_predict() without return types