code: def setup_hdfs():
      import pyarrow
  
      hdfs = pyarrow.hdfs.connect(host="localhost", port=8020)
      if hdfs.exists(TEST_DIR):
          hdfs.rm(TEST_DIR, recursive=True)
  
      yield hdfs
  
      if hdfs.exists(TEST_DIR):
          hdfs.rm(TEST_DIR, recursive=True)
  
imports: import pandas
  import numpy
  import pytest
  from ....None import dataframe
  from ....tests.core import require_hadoop
label_desc: Use image node_id 1 for calling a global function with example usage: setup_hdfs() without return types