code: def base_test(
      self,
      ckpt_name,
      reference_score,
      score_delta=0.3,
      dataset="librispeech_test-other",
      max_tokens=65_536,
      max_positions=(4_096, 1_024),
      arg_overrides=None,
      strict=True,
      score_type="wer",
  ):
      models, _, task, generator = self.download_and_load_checkpoint(
          ckpt_name, arg_overrides=arg_overrides, strict=strict
      )
      if not self.use_cuda:
          return
  
      batch_iterator = self.get_batch_iterator(
          task, dataset, max_tokens, max_positions
      )
      if score_type == "bleu":
          scorer = self.get_bleu_scorer()
      elif score_type == "wer":
          scorer = self.get_wer_scorer()
      else:
          raise Exception(f"Unsupported score type {score_type}")
  
      progress = tqdm(
          enumerate(batch_iterator), total=len(batch_iterator)
      )
      for batch_idx, sample in progress:
          sample = (
              utils.move_to_cuda(sample) if self.use_cuda else sample
          )
          hypo = task.inference_step(generator, models, sample)
          for i, sample_id in enumerate(sample["id"].tolist()):
              tgt_str, hypo_str = self.postprocess_tokens(
                  task,
                  sample["target"][i, :],
                  hypo[i][0]["tokens"].int().cpu(),
              )
              if batch_idx == 0 and i < 3:
                  print(f"T-{sample_id} {tgt_str}")
                  print(f"H-{sample_id} {hypo_str}")
              scorer.add_string(tgt_str, hypo_str)
  
      print(scorer.result_string() + f" (reference: {reference_score})")
      self.assertAlmostEqual(
          scorer.score(), reference_score, delta=score_delta
      )
  
imports: from argparse import Namespace
  import os
  import re
  import unittest
  from pathlib import Path
  from tqdm import tqdm
  from typing import List, Dict, Optional
  import torch
  from fairseq.checkpoint_utils import load_model_ensemble_and_task
  from fairseq.scoring.wer import WerScorer
  from fairseq.scoring.bleu import SacrebleuScorer
  from fairseq import utils
  import zipfile
label_desc: Use image node_id 12 for calling the TestFairseqSpeech obj's underlying member method code with example usage: obj.base_test(ckpt_name, reference_score, score_delta, dataset, max_tokens, max_positions, arg_overrides, strict, score_type) without return types