code: def test_call_endpoints_raises_exceptions():
      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)}
              ),
              RestException(
                  {"error_code": ErrorCode.Name(ENDPOINT_NOT_FOUND)}
              ),
          ]
          host_only = MlflowHostCreds("http://my-host")
          endpoints = [
              ("/my/endpoint", "POST"),
              ("/my/endpoint", "GET"),
          ]
          with pytest.raises(RestException, match="ENDPOINT_NOT_FOUND"):
              call_endpoints(host_only, endpoints, "", response_proto)
          mock_call_endpoint.side_effect = [RestException({}), None]
          with pytest.raises(RestException, match="INTERNAL_ERROR"):
              call_endpoints(host_only, endpoints, "", response_proto)
  
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 5 for calling a global function with example usage: test_call_endpoints_raises_exceptions() without return types