code: def hdfs(scope="module"):
      # Default Rpc port can be 8020/9000 depending on the hdfs config
      fs = pa.hdfs.connect(host=host, port=port)
      try:
          if not fs.exists(basedir):
              fs.mkdir(basedir)
      except pa.lib.ArrowIOError:
          pytest.skip("hdfs config probably incorrect")
  
      return fs
  
imports: import os
  from io import BytesIO
  import fastavro
  import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 1 for calling a global function with example usage: hdfs(scope) and returns: fs