code: def test_get_s3_client_hits_cache(s3_artifact_root, monkeypatch):
      with mock.patch("boto3.client") as mock_get_s3_client:
          s3_client_mock = mock.Mock()
          mock_get_s3_client.return_value = s3_client_mock
          s3_client_mock.head_bucket.return_value = {
              "BucketRegion": "us-west-2"
          }
  
          # pylint: disable=no-value-for-parameter
          repo = OptimizedS3ArtifactRepository(
              posixpath.join(s3_artifact_root, "some/path")
          )
  
          # We get the s3 client once during initialization to get the bucket region name
          cache_info = _cached_get_s3_client.cache_info()
          assert cache_info.hits == 0
          assert cache_info.misses == 1
          assert cache_info.currsize == 1
  
          # When the s3 client is fetched via class method, it is called with the region name
          repo._get_s3_client()
          cache_info = _cached_get_s3_client.cache_info()
          assert cache_info.hits == 0
          assert cache_info.misses == 2
          assert cache_info.currsize == 2
  
          # A second fetch via class method leads to cache hit
          repo._get_s3_client()
          cache_info = _cached_get_s3_client.cache_info()
          assert cache_info.hits == 1
          assert cache_info.misses == 2
          assert cache_info.currsize == 2
  
          monkeypatch.setenv(
              "MLFLOW_EXPERIMENTAL_S3_SIGNATURE_VERSION", "s3v2"
          )
          repo._get_s3_client()
          cache_info = _cached_get_s3_client.cache_info()
          assert cache_info.hits == 1
          assert cache_info.misses == 3
          assert cache_info.currsize == 3
  
          with mock.patch(
              "mlflow.store.artifact.s3_artifact_repo._get_utcnow_timestamp",
              return_value=datetime.utcnow().timestamp()
              + _MAX_CACHE_SECONDS,
          ):
              repo._get_s3_client()
          cache_info = _cached_get_s3_client.cache_info()
          assert cache_info.hits == 1
          assert cache_info.misses == 4
          assert cache_info.currsize == 4
  
file_path: mlflow/tests/store/artifact/test_optimized_s3_artifact_repo.py
imports: import os
  import posixpath
  from datetime import datetime
  from unittest import mock
  from unittest.mock import ANY
  import pytest
  from mlflow.protos.service_pb2 import FileInfo
  from mlflow.store.artifact.optimized_s3_artifact_repo import OptimizedS3ArtifactRepository
  from mlflow.store.artifact.s3_artifact_repo import _MAX_CACHE_SECONDS, _cached_get_s3_client
  from tests.helper_functions import set_boto_credentials
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_s3_client_hits_cache(s3_artifact_root, monkeypatch) without return types