class_docstr: Dialogue State Tracking Model SGD-QA (https://arxiv.org/abs/2105.08049)
  
  The SGD-QA model is a fast multi-pass schema-guided state-tracking model, that is trained on the Google schema-guided state tracking dataset (https://arxiv.org/abs/1909.05855).
  The model takes dialogue as input and outputs the dialogue state, which includes slot-value pairs. 
  The model consists of two components: a neural natural language understanding model (NLU), and a rule-based state tracker.
  The NLU takes in a dialogue turn and different schema (entity) information options and outputs their match score. The state tracker takes the highest rated entities and composes
  the dialogue state across turns.
class_docstr_tok: ["Dialogue","State","Tracking","Model","SGD-QA","(","https",":","\/\/arxiv.org\/abs\/2105.08049",")","The","SGD-QA","model","is","a","fast","multi-pass","schema-guided","state-tracking","model",",","that","is","trained","on","the","Google","schema-guided","state","tracking","dataset","(","https",":","\/\/arxiv.org\/abs\/1909.05855",")",".","The","model","takes","dialogue","as","input","and","outputs","the","dialogue","state",",","which","includes","slot-value","pairs",".","The","model","consists","of","two","components",":","a","neural","natural","language","understanding","model","(","NLU",")",",","and","a","rule-based","state","tracker",".","The","NLU","takes","in","a","dialogue","turn","and","different","schema","(","entity",")","information","options","and","outputs","their","match","score",".","The","state","tracker","takes","the","highest","rated","entities","and","composes","the","dialogue","state","across","turns","."]
docstr: Called at the end of test to post process outputs into human readable format
  Args:
      outputs: list of individual outputs of each test step
      dataloader_idx: dataloader index
docstr_tok: ["Called","at","the","end","of","test","to","post","process","outputs","into","human","readable","format","Args",":","outputs",":","list","of","individual","outputs","of","each","test","step","dataloader_idx",":","dataloader","index"]
code: def multi_test_epoch_end(
      self, outputs: List[dict], dataloader_idx: int = 0
  ):
      """
      Called at the end of test to post process outputs into human readable format
      Args:
          outputs: list of individual outputs of each test step
          dataloader_idx: dataloader index
      """
      avg_loss = torch.stack([x[f"test_loss"] for x in outputs]).mean()
      split = self._test_names[dataloader_idx][:-1]
      dataloader = self._test_dl[dataloader_idx]
      metrics = self.multi_eval_epoch_end_helper(
          outputs=outputs, split=split, dataloader=dataloader
      )
  
      for k, v in metrics.items():
          self.log(f"{split}_{k}", v, rank_zero_only=True)
  
      self.log(
          f"test_loss", avg_loss, prog_bar=True, rank_zero_only=True
      )
  
imports: import os
  from typing import List, Optional
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from torch.utils.data import DataLoader
  from nemo.collections.nlp.data.dialogue import DialogueSGDBERTDataset, DialogueSGDDataProcessor
  from nemo.collections.nlp.data.dialogue.sgd.evaluate import evaluate, get_in_domain_services
  from nemo.collections.nlp.data.dialogue.sgd.prediction_utils import write_predictions_to_file
  from nemo.collections.nlp.losses import SGDDialogueStateLoss
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.collections.nlp.modules import SGDDecoder, SGDEncoder
  from nemo.collections.nlp.parts.utils_funcs import tensor2list
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.utils import logging
label_desc: Use image node_id 9 for calling the SGDQAModel obj's underlying member method code with example usage: obj.multi_test_epoch_end(outputs, dataloader_idx) without return types