code: def prep_patterns(filenames):
      
  
      patterns = []
  
      for filename in filenames:
          try:
              with open(filename) as file:
                  patterns += [l.rstrip('\n') for l in file]
          except:  # pylint: disable=W0702
              LOGGER.error("Unable to load pattern file '%s'" % filename)
              sys.exit(1)
  
      if patterns:
          # return a set to eliminate duplicates
          return set(patterns)
      else:
          LOGGER.error('No terms were loaded')
          sys.exit(1)
docs: Load pattern files passed via options and return list of patterns.