code: def test_log_artifacts_in_parallel_when_necessary(
      s3_artifact_root, mock_s3_bucket, tmp_path, monkeypatch
  ):
      repo = OptimizedS3ArtifactRepository(
          posixpath.join(s3_artifact_root, "some/path")
      )
  
      file_a_name = "a.txt"
      file_a_text = "A"
      file_a_path = os.path.join(tmp_path, file_a_name)
      with open(file_a_path, "w") as f:
          f.write(file_a_text)
  
      monkeypatch.setenv("MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE", "0")
      with mock.patch(
          f"{S3_ARTIFACT_REPOSITORY}._multipart_upload",
          return_value=None,
      ) as multipart_upload_mock:
          repo.log_artifacts(tmp_path)
          multipart_upload_mock.assert_called_once_with(
              ANY, ANY, mock_s3_bucket, "some/path/a.txt"
          )
  
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 8 for calling a global function with example usage: test_log_artifacts_in_parallel_when_necessary(s3_artifact_root, mock_s3_bucket, tmp_path, monkeypatch) without return types