code: def demisto_classification(alert, publication):
      """
      This publisher appropriately sets the demisto incident type and playbook.
  
      It first looks into the alert's context for the "demisto" key, where individual rules can
      explcitly specify the desired classification traits of the output alert.
      """
  
      # If a rule explicitly states Demisto information with the alert context, obey that
      # The convention to follow is any key in this dict (example, "incident_type") is mapped
      # directly onto the Demisto output magic keys (example, @demisto.incident_type)
      if "demisto" in alert.context:
          for key, value in alert.context["demisto"].items():
              output_key = "@demisto.{}".format(key)
              publication[output_key] = value
  
          return publication
  
      # If no context was explicitly declared, then we default to our global rules
      for code in GLOBAL_CLASSIFIERS:
          payload = code(alert)
          if payload:
              for key, value in payload:
                  output_key = "@demisto.{}".format(key)
                  publication[output_key] = value
  
              return publication
  
      # Else, nothing
      return publication
  
label_desc: Use image node_id 1 for calling a global function with example usage: demisto_classification(alert, publication) and returns: publication, publication, publication