code: def test_download_directory_artifact_succeeds_when_artifact_root_is_s3_bucket_root(
      s3_artifact_root, tmp_path
  ):
      file_a_name = "a.txt"
      file_a_text = "A"
      subdir = tmp_path / "subdir"
      subdir.mkdir()
      subdir_path = str(subdir)
      nested_path = os.path.join(subdir_path, "nested")
      os.makedirs(nested_path)
      with open(os.path.join(nested_path, file_a_name), "w") as f:
          f.write(file_a_text)
  
      repo = get_artifact_repository(s3_artifact_root)
      repo.log_artifacts(subdir_path)
  
      downloaded_dir_path = repo.download_artifacts("nested")
      assert file_a_name in os.listdir(downloaded_dir_path)
      with open(os.path.join(downloaded_dir_path, file_a_name)) as f:
          assert f.read() == file_a_text
  
imports: import json
  import os
  import posixpath
  import tarfile
  from datetime import datetime
  from unittest import mock
  from unittest.mock import ANY
  import botocore.exceptions
  import pytest
  import requests
  from mlflow.entities.multipart_upload import MultipartUploadPart
  from mlflow.store.artifact.artifact_repository_registry import get_artifact_repository
  from mlflow.store.artifact.optimized_s3_artifact_repo import OptimizedS3ArtifactRepository
  from mlflow.store.artifact.s3_artifact_repo import _MAX_CACHE_SECONDS, S3ArtifactRepository, _cached_get_s3_client
  from tests.helper_functions import set_boto_credentials
label_desc: Use image node_id 14 for calling a global function with example usage: test_download_directory_artifact_succeeds_when_artifact_root_is_s3_bucket_root(s3_artifact_root, tmp_path) without return types