def _normalize_and_get_label(paired_anno: annotation.PairedAnnotation) -> Label:
  """Helper method to compute label of diff detection.

  Args:
    paired_anno: Predicted and gold annotation to compute label of.

  Returns:
    Label of diff detection
  """
  if paired_anno.gold_question is None and paired_anno.pred_question is None:
    label = Label.TRUE_NEGATIVE
    paired_anno.gold_question = ""
    paired_anno.pred_question = ""
  elif paired_anno.pred_question is None:
    label = Label.FALSE_NEGATIVE
    paired_anno.pred_question = ""
  elif paired_anno.gold_question is None:
    label = Label.FALSE_POSITIVE
    paired_anno.gold_question = ""
  else:
    label = Label.TRUE_POSITIVE
  return label
Helper method to compute label of diff detection.

  Args:
    paired_anno: Predicted and gold annotation to compute label of.

  Returns:
    Label of diff detection
  
language/diffqg/metrics.py