class_docstr: Base class for hybrid RNNT/CTC models.
code: def multi_validation_epoch_end(
      self, outputs, dataloader_idx: int = 0
  ):
      if self.compute_eval_loss:
          val_loss_mean = torch.stack(
              [x["val_loss"] for x in outputs]
          ).mean()
          val_loss_log = {"val_loss": val_loss_mean}
      else:
          val_loss_log = {}
      wer_num = torch.stack([x["val_wer_num"] for x in outputs]).sum()
      wer_denom = torch.stack(
          [x["val_wer_denom"] for x in outputs]
      ).sum()
      tensorboard_logs = {
          **val_loss_log,
          "val_wer": wer_num.float() / wer_denom,
      }
      if self.ctc_loss_weight > 0:
          ctc_wer_num = torch.stack(
              [x["val_wer_num_ctc"] for x in outputs]
          ).sum()
          ctc_wer_denom = torch.stack(
              [x["val_wer_denom_ctc"] for x in outputs]
          ).sum()
          tensorboard_logs["val_wer_ctc"] = (
              ctc_wer_num.float() / ctc_wer_denom
          )
      metrics = {**val_loss_log, "log": tensorboard_logs}
      self.finalize_interctc_metrics(metrics, outputs, prefix="val_")
      return metrics
  
imports: import copy
  import json
  import os
  import tempfile
  from typing import List, Optional
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from tqdm.auto import tqdm
  from nemo.collections.asr.data.audio_to_text_dali import DALIOutputs
  from nemo.collections.asr.losses.ctc import CTCLoss
  from nemo.collections.asr.metrics.wer import WER
  from nemo.collections.asr.models.rnnt_models import EncDecRNNTModel
  from nemo.collections.asr.parts.mixins import ASRBPEMixin, InterCTCMixin
  from nemo.collections.asr.parts.submodules.ctc_decoding import CTCDecoding, CTCDecodingConfig
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.core.classes.mixins import AccessMixin
  from nemo.utils import logging, model_utils
label_desc: Use image node_id 10 for calling the EncDecHybridRNNTCTCModel obj's underlying member method code with example usage: obj.multi_validation_epoch_end(outputs, dataloader_idx) and returns: metrics