code: def get_fields_to_compare(
      inputs: JsonDict, instance: Instance, input_field_to_attack: str
  ) -> JsonDict:
      """
      Gets a list of the fields that should be checked for equality after an attack is performed.
  
      # Parameters
  
      inputs : `JsonDict`
          The input you want to attack, similar to the argument to a Predictor, e.g., predict_json().
      instance : `Instance`
          A labeled instance that is output from json_to_labeled_instances().
      input_field_to_attack : `str`
          The key in the inputs JsonDict you want to attack, e.g., tokens.
  
      # Returns
  
      fields : `JsonDict`
          The fields that must be compared for equality.
      """
      # TODO(mattg): this really should live on the Predictor.  We have some messy stuff for, e.g.,
      # reading comprehension models, and the interpret code can't really know about the internals of
      # that (or at least it shouldn't now, and once we split out the reading comprehension repo, it
      # really *can't*).
      fields_to_compare = {
          key: instance[key]
          for key in instance.fields
          if key not in inputs
          and key != input_field_to_attack
          and key != "metadata"
          and key != "output"
      }
      return fields_to_compare
  
imports: from allennlp.common.util import JsonDict
  from allennlp.data import Instance
label_desc: Use image node_id 1 for calling a global function with example usage: get_fields_to_compare(inputs, instance, input_field_to_attack) and returns: fields_to_compare