code: def test_download_artifacts_calls_expected_gcs_client_methods(
      mock_client, tmp_path
  ):
      repo = GCSArtifactRepository(
          "gs://test_bucket/some/path", mock_client
      )
  
      def mkfile(fname, **kwargs):
          # pylint: disable=unused-argument
          fname = os.path.basename(fname)
          f = tmp_path.joinpath(fname)
          f.write_text("hello world!")
  
      mock_method_chain(
          mock_client,
          [
              "bucket",
              "blob",
              "download_to_filename",
          ],
          side_effect=mkfile,
      )
  
      repo.download_artifacts("test.txt")
      assert tmp_path.joinpath("test.txt").exists()
      mock_client.bucket.assert_called_with("test_bucket")
      mock_client.bucket().blob.assert_called_with(
          "some/path/test.txt", chunk_size=repo._GCS_DOWNLOAD_CHUNK_SIZE
      )
      download_calls = (
          mock_client.bucket()
          .blob()
          .download_to_filename.call_args_list
      )
      assert len(download_calls) == 1
      download_path_arg = download_calls[0][0][0]
      assert "test.txt" in download_path_arg
  
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 9 for calling a global function with example usage: test_download_artifacts_calls_expected_gcs_client_methods(mock_client, tmp_path) without return types