code: def test_log_artifacts(mock_client, tmp_path):
      repo = GCSArtifactRepository(
          "gs://test_bucket/some/path", mock_client
      )
  
      data = tmp_path.joinpath("data")
      data.mkdir()
      subd = data.joinpath("subdir")
      subd.mkdir()
      subd.joinpath("a.txt").write_text("A")
      subd.joinpath("b.txt").write_text("B")
      subd.joinpath("c.txt").write_text("C")
  
      def custom_isfile(*args, **kwargs):
          if args:
              return os.path.isfile(args[0])
          return os.path.isfile(kwargs.get("filename"))
  
      mock_method_chain(
          mock_client,
          [
              "bucket",
              "blob",
              "upload_from_filename",
          ],
          side_effect=custom_isfile,
      )
      repo.log_artifacts(subd)
  
      mock_client.bucket.assert_called_with("test_bucket")
      mock_client.bucket().blob().upload_from_filename.assert_has_calls(
          [
              mock.call(
                  os.path.normpath(f"{subd}/a.txt"),
                  timeout=repo._GCS_DEFAULT_TIMEOUT,
              ),
              mock.call(
                  os.path.normpath(f"{subd}/b.txt"),
                  timeout=repo._GCS_DEFAULT_TIMEOUT,
              ),
              mock.call(
                  os.path.normpath(f"{subd}/c.txt"),
                  timeout=repo._GCS_DEFAULT_TIMEOUT,
              ),
          ],
          any_order=True,
      )
  
imports: import os
  import posixpath
  from unittest import mock
  import pytest
  import requests
  from google.auth.exceptions import DefaultCredentialsError
  from google.cloud.storage import client
  from mlflow.entities.multipart_upload import MultipartUploadPart
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.gcs_artifact_repo import GCSArtifactRepository, GCSMPUArguments
  from tests.helper_functions import mock_method_chain
label_desc: Use image node_id 8 for calling a global function with example usage: test_log_artifacts(mock_client, tmp_path) and returns: os, os