code: def run_eval_subset(model, dataloader, subset):
      total_edit_distance = 0
      total_length = 0
      with torch.no_grad():
          for idx, (batch, transcripts) in enumerate(dataloader):
              actual = transcripts[0]
              predicted = model(batch)
              total_edit_distance += compute_word_level_distance(
                  actual, predicted
              )
              total_length += len(actual.split())
              if idx % 100 == 0:
                  logger.info(
                      f"Processed elem {idx}; WER: {total_edit_distance / total_length}"
                  )
      logger.info(
          f"Final WER for {subset} set: {total_edit_distance / total_length}"
      )
  
file_path: audio/examples/asr/emformer_rnnt/eval.py
imports: import logging
  import pathlib
  from argparse import ArgumentParser, RawTextHelpFormatter
  import torch
  import torchaudio
  from common import MODEL_TYPE_LIBRISPEECH, MODEL_TYPE_MUSTC, MODEL_TYPE_TEDLIUM3
  from librispeech.lightning import LibriSpeechRNNTModule
  from mustc.lightning import MuSTCRNNTModule
  from tedlium3.lightning import TEDLIUM3RNNTModule
label_desc: Use image node_id 2 for calling a global function with example usage: run_eval_subset(model, dataloader, subset) without return types