code: def add_fs(doctest_namespace, request, tmp_path):
      # Trigger ONLY for the doctests
      doctest_m = request.config.option.doctestmodules
      doctest_c = getattr(
          request.config.option, "doctest_cython", False
      )
  
      if doctest_m or doctest_c:
          # fs import
          doctest_namespace["fs"] = fs
  
          # Creation of an object and file with data
          local = fs.LocalFileSystem()
          path = tmp_path / "pyarrow-fs-example.dat"
          with local.open_output_stream(str(path)) as stream:
              stream.write(b"data")
          doctest_namespace["local"] = local
          doctest_namespace["local_path"] = str(tmp_path)
          doctest_namespace["path"] = str(path)
      yield
  
file_path: arrow/python/pyarrow/conftest.py
imports: import pytest
  import pyarrow
  from pyarrow import Codec
  from pyarrow import fs
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: add_fs(doctest_namespace, request, tmp_path) without return types