code: def filter_file_list(self, workspace):
      file_list = workspace.pipeline.file_list
      if file_list and not workspace.file_list.has_files():
          LOGGER.warning(
              "Workspace file list is empty, will populate from pipeline."
              "This may happen if you're running in headless mode."
          )
          workspace.file_list.add_files_to_filelist(
              [f.url for f in file_list]
          )
      if self.filter_choice != FILTER_CHOICE_NONE:
          if self.filter_choice == FILTER_CHOICE_IMAGES:
              file_list = [
                  image_file
                  for image_file in file_list
                  if is_image(image_file.url)
              ]
          else:
              new_file_list = []
              for image_file in file_list:
                  modpath = image_file.modpath
                  if self.filter.evaluate(
                      (
                          FileCollectionDisplay.NODE_FILE,
                          modpath,
                          None,
                      )
                  ):
                      new_file_list.append(image_file)
              file_list = new_file_list
      workspace.pipeline.set_filtered_file_list(file_list, self)
      return file_list
  
imports: import itertools
  import logging
  from cellprofiler_core.constants.measurement import C_SERIES_NAME, C_C, C_SERIES, C_Z, C_T
  from cellprofiler_core.pipeline import ImagePlane
  from cellprofiler_core.constants.module import FILTER_RULES_BUTTONS_HELP
  from cellprofiler_core.constants.modules.images import FILTER_CHOICE_ALL
  from cellprofiler_core.constants.modules.images import FILTER_CHOICE_CUSTOM
  from cellprofiler_core.constants.modules.images import FILTER_CHOICE_IMAGES
  from cellprofiler_core.constants.modules.images import FILTER_CHOICE_NONE
  from cellprofiler_core.constants.modules.images import FILTER_DEFAULT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import FileCollectionDisplay
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.setting import PathListDisplay
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import PathListRefreshButton
  from cellprofiler_core.setting.do_something import PathListExtractButton
  from cellprofiler_core.setting.filter import DirectoryPredicate
  from cellprofiler_core.setting.filter import ExtensionPredicate
  from cellprofiler_core.setting.filter import FilePredicate
  from cellprofiler_core.setting.filter import Filter
  from cellprofiler_core.utilities.image import image_resource
  from cellprofiler_core.utilities.image import is_image
label_desc: Use image node_id 8 for calling the Images obj's underlying member method code with example usage: obj.filter_file_list(workspace) and returns: file_list