code: def test_log_artifact(hdfs_system_mock):
      repo = HdfsArtifactRepository("hdfs://host_name:8020/hdfs/path")
  
      with TempDir() as tmp_dir:
          local_file = tmp_dir.path("sample_file")
          with open(local_file, "w") as f:
              f.write("PyArrow Works")
  
          repo.log_artifact(local_file, "more_path/some")
  
          hdfs_system_mock.assert_called_once_with(
              extra_conf=None,
              host="hdfs://host_name",
              kerb_ticket=None,
              port=8020,
              user=None,
          )
  
          upload_mock = hdfs_system_mock.return_value.upload
          upload_mock.assert_called_once_with(
              "/hdfs/path/more_path/some/sample_file", ANY
          )
          args, _ = upload_mock.call_args
          assert isinstance(args[1], BufferedReader)
  
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 1 for calling a global function with example usage: test_log_artifact(hdfs_system_mock) without return types