code: def filter_files(prefix, suffix, files, remove_prefix=None):
      """
      Filter files by prefix and suffix.
      """
      filtered, rest = [], []
      match = re.compile(prefix + r".*" + suffix + r"\Z").match
      if remove_prefix:
          ind = len(prefix)
      else:
          ind = 0
      for file in [x.strip() for x in files]:
          if match(file):
              filtered.append(file[ind:])
          else:
              rest.append(file)
      return filtered, rest
  
imports: from __future__ import division, absolute_import, print_function
  import sys
  import os
  import pprint
  import re
  from .None import crackfortran
  from .None import rules
  from .None import cb_rules
  from .None import auxfuncs
  from .None import cfuncs
  from .None import f90mod_rules
  from .None import __version__
label_desc: Use image node_id 6 for calling a global function with example usage: filter_files(prefix, suffix, files, remove_prefix) and returns: filtered,  rest