code: def rouge_2_fscore(logits, labels):
    
    predictions = tf.to_int32(tf.argmax(logits, axis=-1))
    # TODO: Look into removing use of py_func
    rouge_2_f_score = tf.py_func(rouge_n, (predictions, labels), tf.float32)
    return rouge_2_f_score, tf.constant(1.0)
docs: ROUGE-2 F1 score computation between labels and predictions.
  
    This is an approximate ROUGE scoring method since we do not glue word pieces
    or decode the ids and tokenize the output.
  
    Args:
      logits: tensor, model predictions
      labels: tensor, gold output.
  
    Returns:
      rouge2_fscore: approx rouge-2 f1 score.