code: def test_download_artifacts_provides_failure_info(
      base_uri, download_arg, list_return_val
  ):
      def list_artifacts(path):
          fullpath = posixpath.join(base_uri, path)
          if fullpath.endswith(_MODEL_DIR) or fullpath.endswith(
              _MODEL_DIR + "/"
          ):
              return [
                  FileInfo(item, False, _DUMMY_FILE_SIZE)
                  for item in list_return_val
              ]
          else:
              return []
  
      with mock.patch.object(
          FailureArtifactRepositoryImpl, "list_artifacts"
      ) as list_artifacts_mock:
          list_artifacts_mock.side_effect = list_artifacts
          repo = FailureArtifactRepositoryImpl(base_uri)
          match = r"The following failures occurred while downloading one or more artifacts."
          with pytest.raises(MlflowException, match=match) as exc:
              repo.download_artifacts(download_arg)
  
          err_msg = str(exc.value)
          assert _MODEL_FILE in err_msg
          assert _MOCK_ERROR in err_msg
  
imports: import posixpath
  import time
  from unittest import mock
  import pytest
  from mlflow.entities import FileInfo
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository
  from mlflow.utils.file_utils import TempDir
label_desc: Use image node_id 7 for calling a global function with example usage: test_download_artifacts_provides_failure_info(base_uri, download_arg, list_return_val) and returns: unknown, list