code: def filter_ext(files, exts):
      if isinstance(exts, str):
          exts = {exts}
      return list(
          filter(
              lambda s: any(
                  map(lambda ext: s.endswith("." + ext), exts)
              ),
              files,
          )
      )
  
file_path: DALI/dali/test/python/webdataset_base.py
imports: from nvidia.dali import pipeline_def
  from nvidia.dali.fn import readers
  from nose.tools import assert_equal
  import tempfile
  from subprocess import call
  import os
  import tarfile
label_desc: Use image node_id 2 for calling a global function with example usage: filter_ext(files, exts) and returns: list