code: def _delete_dictionary_fields(publication, regexp):
      """Deeply destroys all nested dict keys matching the given regexp string
  
      Args:
          publication (dict): A publication
          regexp (str): A String that is valid regexp
  
      Returns:
          dict
          (!) warning, will modify the original publication
      """
      # Python is bad at recursion so I managed to tip toe around that with BFS using a queue.
      # This heavily takes advantage of internal references being maintained properly as the loop
      # does not actually track the "current scope" of the next_item.
      fringe = deque()
      fringe.append(publication)
      while len(fringe) > 0:
          next_item = fringe.popleft()
  
          if isinstance(next_item, dict):
              # work on a copy of the keys to avoid modifying the dict while iterating over it
              for key in list(next_item.keys()):
                  if re.search(regexp, key):
                      next_item.pop(key, None)
  
              for key, item in next_item.items():
                  fringe.append(item)
          elif isinstance(next_item, list):
              fringe.extend(next_item)
          else:
              # It's a leaf node, or it's some strange object that doesn't belong here
              pass
  
      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 4 for calling a global function with example usage: _delete_dictionary_fields(publication, regexp) and returns: publication