code: def test_call_endpoints():
      with mock.patch(
          "mlflow.utils.rest_utils.call_endpoint"
      ) as mock_call_endpoint:
          response_proto = GetRun.Response()
          mock_call_endpoint.side_effect = [
              RestException(
                  {"error_code": ErrorCode.Name(ENDPOINT_NOT_FOUND)}
              ),
              None,
          ]
          host_only = MlflowHostCreds("http://my-host")
          endpoints = [
              ("/my/endpoint", "POST"),
              ("/my/endpoint", "GET"),
          ]
          resp = call_endpoints(
              host_only, endpoints, "", response_proto
          )
          mock_call_endpoint.assert_has_calls(
              [
                  mock.call(
                      host_only,
                      endpoint,
                      method,
                      "",
                      response_proto,
                      None,
                  )
                  for endpoint, method in endpoints
              ]
          )
          assert resp is None
  
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 4 for calling a global function with example usage: test_call_endpoints() without return types