code: def record(answer, example=None, is_target=False):
      """Returns dict with answer, or all answers + grouping key for a target."""
      if is_target:
          return {
              "value": [
                  tf.compat.as_text(a) for a in example["answers"]
              ],
              # Add the group since the model output will not have it.
              "group": (example["idx/passage"], example["idx/query"]),
          }
      return {"value": answer}
  
file_path: text-to-text-transfer-transformer/t5/data/postprocessors.py
imports: import tensorflow.compat.v2
label_desc: Use image node_id 5 for calling a global function with example usage: record(answer, example, is_target) and returns: dict, dict