code: def test_http_request_request_headers_user_agent_and_extra_header(
      request,
  ):
      """This test requires the package in tests/resources/mlflow-test-plugin to be installed"""
  
      from mlflow_test_plugin.request_header_provider import (
          PluginRequestHeaderProvider,
      )
  
      # The test plugin's request header provider always returns False from in_context to avoid
      # polluting request headers in developers' environments. The following mock overrides this to
      # perform the integration test.
      with mock.patch.object(
          PluginRequestHeaderProvider, "in_context", return_value=True
      ), mock.patch.object(
          PluginRequestHeaderProvider,
          "request_headers",
          return_value={
              _USER_AGENT: "test_user_agent",
              "header": "value",
          },
      ):
          host_only = MlflowHostCreds(
              "http://my-host", server_cert_path="/some/path"
          )
          expected_headers = {
              _USER_AGENT: "{} {}".format(
                  DefaultRequestHeaderProvider().request_headers()[
                      _USER_AGENT
                  ],
                  "test_user_agent",
              ),
              "header": "value",
          }
  
          response = mock.MagicMock()
          response.status_code = 200
          request.return_value = response
          http_request(host_only, "/my/endpoint", "GET")
          request.assert_called_with(
              "GET",
              "http://my-host/my/endpoint",
              allow_redirects=True,
              verify="/some/path",
              headers=expected_headers,
              timeout=120,
          )
  
imports: import re
  from unittest import mock
  import numpy
  import pytest
  import requests
  from mlflow.environment_variables import MLFLOW_HTTP_REQUEST_TIMEOUT
  from mlflow.exceptions import InvalidUrlException, MlflowException, RestException
  from mlflow.protos.databricks_pb2 import ENDPOINT_NOT_FOUND, ErrorCode
  from mlflow.protos.service_pb2 import GetRun
  from mlflow.pyfunc.scoring_server import NumpyEncoder
  from mlflow.tracking.request_header.default_request_header_provider import _USER_AGENT, DefaultRequestHeaderProvider
  from mlflow.utils.rest_utils import MlflowHostCreds, _can_parse_as_json_object, augmented_raise_for_status, call_endpoint, call_endpoints, http_request, http_request_safe
  from tests import helper_functions
label_desc: Use image node_id 18 for calling a global function with example usage: test_http_request_request_headers_user_agent_and_extra_header(request) without return types