docstr: Called at the end of test to aggregate outputs and decode them.
docstr_tok: ["Called","at","the","end","of","test","to","aggregate","outputs","and","decode","them","."]
code: def on_test_epoch_end(
      self, outputs: List[torch.Tensor]
  ) -> Dict[str, List[str]]:
      """Called at the end of test to aggregate outputs and decode them."""
      texts = [
          self.encoder_tokenizer.ids_to_text(seq)
          for batch in outputs
          for seq in batch
      ]
      self.test_output = [{"texts": texts}]
      return {"texts": texts}
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from transformers import AutoModel, BartForConditionalGeneration, EncoderDecoderModel
  from nemo.collections.common.metrics import Perplexity
  from nemo.collections.nlp.data.text2sparql import Text2SparqlDataset
  from nemo.collections.nlp.modules.common.tokenizer_utils import get_tokenizer
  from nemo.core.classes.common import typecheck
  from nemo.core.classes.modelPT import ModelPT
  from nemo.core.neural_types import ChannelType, MaskType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 9 for calling the Text2SparqlModel obj's underlying member method code with example usage: obj.on_test_epoch_end(outputs) and returns: dict