code: def _seq2seq_metrics(pred, tokenizer):
      predictions, labels = pred
      decoded_preds = tokenizer.batch_decode(
          predictions, skip_special_tokens=True
      )
  
      labels = np.where(labels != -100, labels, tokenizer.pad_token_id)
      decoded_labels = tokenizer.batch_decode(
          labels, skip_special_tokens=True
      )
  
      decoded_preds = [
          "\n".join(nltk.sent_tokenize(pred.strip()))
          for pred in decoded_preds
      ]
      decoded_labels = [
          "\n".join(nltk.sent_tokenize(label.strip()))
          for label in decoded_labels
      ]
  
      result = ROUGE_METRIC.compute(
          predictions=decoded_preds,
          references=decoded_labels,
          use_stemmer=True,
      )
      result = {key: value * 100 for key, value in result.items()}
  
      prediction_lens = [
          np.count_nonzero(pred != tokenizer.pad_token_id)
          for pred in predictions
      ]
      result["gen_len"] = np.mean(prediction_lens)
  
      return {k: round(v, 4) for k, v in result.items()}
  
imports: import evaluate
  import nltk
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _seq2seq_metrics(pred, tokenizer) and returns: unknown