code: def test_log_artifacts(hdfs_system_mock):
      os.environ[
          "MLFLOW_KERBEROS_TICKET_CACHE"
      ] = "/tmp/krb5cc_22222222"
      os.environ["MLFLOW_KERBEROS_USER"] = "some_kerberos_user"
  
      repo = HdfsArtifactRepository("hdfs:/some_path/maybe/path")
  
      with TempDir() as root_dir:
          with open(root_dir.path("file_one.txt"), "w") as f:
              f.write("PyArrow Works once")
  
          os.mkdir(root_dir.path("subdir"))
          with open(root_dir.path("subdir/file_two.txt"), "w") as f:
              f.write("PyArrow Works two")
  
          repo.log_artifacts(root_dir._path)
  
          hdfs_system_mock.assert_called_once_with(
              extra_conf=None,
              host="default",
              kerb_ticket="/tmp/krb5cc_22222222",
              port=0,
              user="some_kerberos_user",
          )
  
          upload_mock = hdfs_system_mock.return_value.upload
          upload_mock.assert_has_calls(
              calls=[
                  call("/some_path/maybe/path/file_one.txt", ANY),
                  call(
                      "/some_path/maybe/path/subdir/file_two.txt", ANY
                  ),
              ],
              any_order=True,
          )
          call_args_list = upload_mock.call_args_list
  
          args, _ = call_args_list[0]
          assert isinstance(args[1], BufferedReader)
  
          args, _ = call_args_list[1]
          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 5 for calling a global function with example usage: test_log_artifacts(hdfs_system_mock) without return types