code: def test_download_artifacts():
      expected_data = b"hello"
      artifact_path = "test.txt"
      # mock hdfs
      hdfs = mock.Mock()
      hdfs.open = mock_open(read_data=expected_data)
  
      with TempDir() as tmp_dir:
          _download_hdfs_file(
              hdfs,
              artifact_path,
              os.path.join(tmp_dir.path(), artifact_path),
          )
          with open(
              os.path.join(tmp_dir.path(), artifact_path), "rb"
          ) as fd:
              assert expected_data == fd.read()
  
imports: import os
  import sys
  from io import BufferedReader
  from tempfile import NamedTemporaryFile
  from unittest import mock
  from unittest.mock import ANY, call, mock_open
  import pytest
  from pyarrow import HadoopFileSystem
  from mlflow.entities import FileInfo
  from mlflow.store.artifact.hdfs_artifact_repo import HdfsArtifactRepository, _download_hdfs_file, _parse_extra_conf, _relative_path_remote, _resolve_base_path
  from mlflow.utils.file_utils import TempDir
label_desc: Use image node_id 12 for calling a global function with example usage: test_download_artifacts() without return types