code: def remove_fields(alert, publication):
      """This publisher deletes fields from the current publication.
  
      The publisher uses the alert's context to determine which fields to delete. Example:
  
      context={
        'remove_fields': ['^field1$', '^field2$', ...]
      }
  
      "remove_fields" should be an array of strings that are valid regular expressions.
  
      The algorithm deeply searches the publication for any dict key that matches the given regular
      expression. Any such key is removed, and if the value is a nested dict, the entire dict
      branch underneath is removed.
      """
      fields = alert.context.get("remove_fields", [])
  
      for field in fields:
          publication = _delete_dictionary_fields(publication, field)
  
      return publication
  
file_path: streamalert/publishers/community/generic.py
imports: from collections import deque, OrderedDict
  import re
  from streamalert.shared.publisher import Register, AlertPublisher
  from streamalert.shared.normalize import Normalizer
  from streamalert.shared.utils import get_keys
label_desc: Use image node_id 5 for calling a global function with example usage: remove_fields(alert, publication) and returns: publication