code: def test_file_and_directories_artifacts_are_logged_and_listed_successfully_in_batch(
      s3_artifact_repo, tmp_path
  ):
      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(subdir_path, "a.txt"), "w") as f:
          f.write("A")
      with open(os.path.join(subdir_path, "b.txt"), "w") as f:
          f.write("B")
      with open(os.path.join(nested_path, "c.txt"), "w") as f:
          f.write("C")
  
      s3_artifact_repo.log_artifacts(subdir_path)
  
      root_artifacts_listing = sorted(
          [
              (f.path, f.is_dir, f.file_size)
              for f in s3_artifact_repo.list_artifacts()
          ]
      )
      assert root_artifacts_listing == [
          ("a.txt", False, 1),
          ("b.txt", False, 1),
          ("nested", True, None),
      ]
  
      nested_artifacts_listing = sorted(
          [
              (f.path, f.is_dir, f.file_size)
              for f in s3_artifact_repo.list_artifacts("nested")
          ]
      )
      assert nested_artifacts_listing == [("nested/c.txt", False, 1)]
  
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 13 for calling a global function with example usage: test_file_and_directories_artifacts_are_logged_and_listed_successfully_in_batch(s3_artifact_repo, tmp_path) without return types