class_docstr: https://arxiv.org/abs/2306.02317
  BERT-based model for Spellchecking ASR Customization.
  It takes as input ASR hypothesis and candidate customization entries.
  It labels the hypothesis with correct entry index or 0.
  Example input:   [CLS] a s t r o n o m e r s _ d i d i e _ s o m o n _ a n d _ t r i s t i a n _ g l l o [SEP] d i d i e r _ s a u m o n [SEP] a s t r o n o m i e [SEP] t r i s t a n _ g u i l l o t [SEP] ...
  Input segments:      0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0     1 1 1 1 1 1 1 1 1 1 1 1 1 1     2 2 2 2 2 2 2 2 2 2 2     3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3     4      
  Example output:      0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 3 3 3 3 3 3 3 3 3 3 3 3 3 0     ...
class_docstr_tok: ["https",":","\/\/arxiv.org\/abs\/2306.02317","BERT-based","model","for","Spellchecking","ASR","Customization",".","It","takes","as","input","ASR","hypothesis","and","candidate","customization","entries",".","It","labels","the","hypothesis","with","correct","entry","index","or","0",".","Example","input",":","[","CLS","]","a","s","t","r","o","n","o","m","e","r","s","_","d","i","d","i","e","_","s","o","m","o","n","_","a","n","d","_","t","r","i","s","t","i","a","n","_","g","l","l","o","[","SEP","]","d","i","d","i","e","r","_","s","a","u","m","o","n","[","SEP","]","a","s","t","r","o","n","o","m","i","e","[","SEP","]","t","r","i","s","t","a","n","_","g","u","i","l","l","o","t","[","SEP","]","...","Input","segments",":","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","1","1","1","1","1","1","1","1","1","1","1","1","1","1","2","2","2","2","2","2","2","2","2","2","2","3","3","3","3","3","3","3","3","3","3","3","3","3","3","3","3","4","Example","output",":","0","0","0","0","0","0","0","0","0","0","0","0","0","1","1","1","1","1","1","1","1","1","1","1","0","0","0","0","0","3","3","3","3","3","3","3","3","3","3","3","3","3","0","..."]
docstr: Setup function for a infer data loader.
  Args:
      cfg: config dictionary containing data loader params like batch_size, num_workers and pin_memory
      input_name: path to input file. 
  Returns:
      A pytorch DataLoader.
docstr_tok: ["Setup","function","for","a","infer","data","loader",".","Args",":","cfg",":","config","dictionary","containing","data","loader","params","like","batch_size",",","num_workers","and","pin_memory","input_name",":","path","to","input","file",".","Returns",":","A","pytorch","DataLoader","."]
code: def _setup_infer_dataloader(
      self, cfg: DictConfig, input_name: str
  ) -> "torch.utils.data.DataLoader":
      """
      Setup function for a infer data loader.
      Args:
          cfg: config dictionary containing data loader params like batch_size, num_workers and pin_memory
          input_name: path to input file.
      Returns:
          A pytorch DataLoader.
      """
      dataset = SpellcheckingAsrCustomizationTestDataset(
          input_name, example_builder=self.builder
      )
      return torch.utils.data.DataLoader(
          dataset=dataset,
          batch_size=cfg["batch_size"],
          shuffle=False,
          num_workers=cfg.get("num_workers", 0),
          pin_memory=cfg.get("pin_memory", False),
          drop_last=False,
          collate_fn=dataset.collate_fn,
      )
  
imports: from time import perf_counter
  from typing import Dict, Optional
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from nemo.collections.common.losses import CrossEntropyLoss
  from nemo.collections.nlp.data.spellchecking_asr_customization import SpellcheckingAsrCustomizationDataset, SpellcheckingAsrCustomizationTestDataset, TarredSpellcheckingAsrCustomizationDataset, bert_example
  from nemo.collections.nlp.data.text_normalization_as_tagging.utils import read_label_map
  from nemo.collections.nlp.metrics.classification_report import ClassificationReport
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.collections.nlp.modules.common.token_classifier import TokenClassifier
  from nemo.collections.nlp.parts.utils_funcs import tensor2list
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types import LogitsType, NeuralType
  from nemo.utils import logging
  from nemo.utils.decorators import experimental
label_desc: Use image node_id 16 for calling the SpellcheckingAsrCustomizationModel obj's underlying member method code with example usage: obj._setup_infer_dataloader(cfg, input_name) and returns: torch