code: def _test_file_reader_filter(
      filters,
      glob_filters,
      batch_size,
      num_threads,
      subpath,
      case_sensitive_filter,
  ):
      pipe = Pipeline(batch_size, num_threads, 0)
      root = os.path.join(os.environ["DALI_EXTRA_PATH"], subpath)
      files, labels = fn.readers.file(
          file_root=root,
          file_filters=filters,
          case_sensitive_filter=case_sensitive_filter,
      )
      pipe.set_outputs(files, labels)
      pipe.build()
  
      fnames = set()
      for label, dir in enumerate(sorted(next(os.walk(root))[1])):
          for filter in glob_filters:
              for file in glob.glob(os.path.join(root, dir, filter)):
                  fnames.add((label, file.split("/")[-1], file))
  
      fnames = sorted(fnames)
  
      for i in range(len(fnames) // batch_size):
          out_f, _ = pipe.run()
          for j in range(batch_size):
              with open(fnames[i * batch_size + j][2], "rb") as file:
                  contents = np.array(list(file.read()))
                  assert all(contents == out_f.at(j))
  
imports: import glob
  import numpy
  import nvidia.dali.fn
  import os
  import random
  import tempfile
  from nvidia.dali import Pipeline, pipeline_def
  from nose_utils import assert_raises
  from test_utils import compare_pipelines
label_desc: Use image node_id 9 for calling a global function with example usage: _test_file_reader_filter(filters, glob_filters, batch_size, num_threads, subpath, case_sensitive_filter) without return types