code: def test_download_directory_artifact(
      mock_filesystem_client, mock_file_client, tmp_path
  ):
      repo = AzureDataLakeArtifactRepository(TEST_DATA_LAKE_URI, None)
  
      file_path_1 = "file_1"
      file_path_2 = "file_2"
  
      path_props_1 = PathProperties(
          content_length=42,
          name=posixpath.join(TEST_ROOT_PATH, file_path_1),
      )
      path_props_2 = PathProperties(
          content_length=42,
          name=posixpath.join(TEST_ROOT_PATH, file_path_2),
      )
  
      dir_name = "dir"
      dir_path = posixpath.join(TEST_ROOT_PATH, dir_name)
      dir_props = PathProperties(is_directory=True, name=dir_path)
      dir_file_name = "subdir_file"
      dir_file_props = PathProperties(
          content_length=42,
          name=posixpath.join(dir_path, dir_file_name),
      )
  
      def get_mock_listing(*args, **kwargs):
          """
          Produces a mock listing that only contains content if the
          specified prefix is the artifact root. This allows us to mock
          `list_artifacts` during the `_download_artifacts_into` subroutine
          without recursively listing the same artifacts at every level of the
          directory traversal.
          """
          # pylint: disable=unused-argument
          path_arg = posixpath.abspath(kwargs["path"])
          if path_arg == posixpath.abspath(TEST_ROOT_PATH):
              return MockPathList(
                  [path_props_1, path_props_2, dir_props]
              )
          elif path_arg == posixpath.abspath(dir_path):
              return MockPathList([dir_file_props])
          else:
              return MockPathList([])
  
      def create_file(buffer):
          buffer.write(b"hello world!")
  
      mock_filesystem_client.get_paths.side_effect = get_mock_listing
      mock_file_client.download_file().readinto.side_effect = (
          create_file
      )
  
      # Ensure that the root directory can be downloaded successfully
      dest_dir = tmp_path.joinpath("download_dir")
      dest_dir.mkdir()
      repo.download_artifacts(artifact_path="", dst_path=dest_dir)
      # Ensure that the `mkfile` side effect copied all of the download artifacts into `tmp_path`
      dir_contents = os.listdir(dest_dir)
      assert file_path_1 in dir_contents
      assert file_path_2 in dir_contents
      assert dir_name in dir_contents
      subdir_contents = os.listdir(dest_dir.joinpath(dir_name))
      assert dir_file_name in subdir_contents
  
imports: import os
  import posixpath
  from unittest import mock
  from unittest.mock import ANY
  import pytest
  from azure.core.credentials import AzureSasCredential
  from azure.storage.filedatalake import DataLakeDirectoryClient, DataLakeFileClient, DataLakeServiceClient, FileSystemClient, PathProperties
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_artifacts_pb2 import ArtifactCredentialInfo
  from mlflow.protos.service_pb2 import FileInfo
  from mlflow.store.artifact.azure_data_lake_artifact_repo import AzureDataLakeArtifactRepository, _parse_abfss_uri
label_desc: Use image node_id 16 for calling a global function with example usage: test_download_directory_artifact(mock_filesystem_client, mock_file_client, tmp_path) and returns: MockPathList, MockPathList, MockPathList