class_docstr: Wrapper class to perform a summarization task.
code: def __init__(self, model: lit_model.Model):
      model = validate_t5_model(model)
      super().__init__(model)
  
      # TODO(gehrmann): temp solution for ROUGE.
      self._scorer = rouge_scorer.RougeScorer(
          ["rougeL"], use_stemmer=True
      )
      # If output is list[(str, score)] instead of just str
      self._multi_output = isinstance(
          self.output_spec()["output_text"],
          lit_types.GeneratedTextCandidates,
      )
      self._get_pred_string = (
          lit_types.GeneratedTextCandidates.top_text
          if self._multi_output
          else (lambda x: x)
      )
  
imports: import re
  import attr
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.examples.models import model_utils
  from lit_nlp.lib import file_cache
  from lit_nlp.lib import utils
  import tensorflow
  import tensorflow_text
  import transformers
  from rouge_score import rouge_scorer
label_desc: Use image node_id 1 to create a new SummarizationWrapper object from inherited base classes: lit_model with example: obj = SummarizationWrapper(model)