code: def as_custom_details(_, publication):
      """Takes the current publication and sends the entire thing to custom details.
  
      It does this for all fields EXCEPT the pagerduty special fields.
      """
  
      def _is_custom_field(key):
          return key.startswith("@pagerduty")
  
      custom_details = {
          key: value
          for key, value in publication.items()
          if not _is_custom_field(key)
      }
  
      publication["@pagerduty.details"] = custom_details
      publication["@pagerduty-v2.custom_details"] = custom_details
  
      return publication
  
file_path: streamalert/publishers/community/pagerduty/pagerduty_layout.py
imports: from publishers.community.generic import StringifyArrays
  from streamalert.shared.publisher import AlertPublisher, Register
label_desc: Use image node_id 1 for calling a global function with example usage: as_custom_details(_, publication) and returns: publication, key