class_docstr: Computes ROUGE Scores.
class_docstr_tok: ["Computes","ROUGE","Scores","."]
code: def extract_output(
      self, accumulator: _Accumulator
  ) -> Dict[metric_types.MetricKey, scoring.Score]:
      if accumulator.weighted_count == 0.0:
          return {
              self.key: scoring.Score(
                  precision=float("nan"),
                  recall=float("nan"),
                  fmeasure=float("nan"),
              )
          }
      avg_precision = (
          accumulator.total_precision / accumulator.weighted_count
      )
      avg_recall = accumulator.total_recall / accumulator.weighted_count
      avg_fmeasure = (
          accumulator.total_fmeasure / accumulator.weighted_count
      )
      return {
          self.key: scoring.Score(
              precision=avg_precision,
              recall=avg_recall,
              fmeasure=avg_fmeasure,
          )
      }
  
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 6 for calling the RougeCombiner obj's underlying member method code with example usage: obj.extract_output(accumulator) and returns: dict, dict