class_docstr: Computes ROUGE Scores.
class_docstr_tok: ["Computes","ROUGE","Scores","."]
code: def add_input(
      self,
      accumulator: _Accumulator,
      element: metric_types.StandardMetricInputs,
  ) -> _Accumulator:
      labels, predictions, example_weights = next(
          metric_util.to_label_prediction_example_weight(
              element,
              eval_config=self.eval_config,
              model_name=self.model_name,
              output_name=self.output_name,
              example_weighted=True,
              flatten=False,
              require_single_example_weight=True,
          )
      )
  
      example_weight = example_weights[0]
      accumulator.weighted_count += example_weight
  
      rouge_scores = self.scorer.score_multi(labels, predictions[0])[
          self.rouge_type
      ]
      accumulator.total_precision += (
          rouge_scores.precision * example_weight
      )
      accumulator.total_recall += rouge_scores.recall * example_weight
      accumulator.total_fmeasure += (
          rouge_scores.fmeasure * example_weight
      )
  
      return accumulator
  
imports: import dataclasses
  from typing import Dict, Iterable, Optional
  from absl import logging
  import apache_beam
  import nltk
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
  from rouge_score import rouge_scorer
  from rouge_score import scoring
  from rouge_score import tokenizers
label_desc: Use image node_id 4 for calling the RougeCombiner obj's underlying member method code with example usage: obj.add_input(accumulator, element) and returns: accumulator