code: def pytest_ignore_collect(path, config):
      if config.option.doctestmodules:
          # don't try to run doctests on the /tests directory
          if "/pyarrow/tests/" in str(path):
              return True
  
          doctest_groups = [
              "dataset",
              "orc",
              "parquet",
              "flight",
              "substrait",
          ]
  
          # handle cuda, flight, etc
          for group in doctest_groups:
              if "pyarrow/{}".format(group) in str(path):
                  if not defaults[group]:
                      return True
  
          if "pyarrow/parquet/encryption" in str(path):
              if not defaults["parquet_encryption"]:
                  return True
  
          if "pyarrow/cuda" in str(path):
              try:
                  import pyarrow.cuda  # noqa
  
                  return False
              except ImportError:
                  return True
  
          if "pyarrow/fs" in str(path):
              try:
                  from pyarrow.fs import S3FileSystem  # noqa
  
                  return False
              except ImportError:
                  return True
  
      if getattr(config.option, "doctest_cython", False):
          if "/pyarrow/tests/" in str(path):
              return True
          if "/pyarrow/_parquet_encryption" in str(path):
              return True
  
      return False
  
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 1 for calling a global function with example usage: pytest_ignore_collect(path, config) and returns: False, True, True, True, True, False, False, True, True, True