class_docstr: This is a classification model that selects the best heteronym option out of possible dictionary entries.
  Supports only heteronyms, no OOV.
code: def _setup_dataloader_from_config(
      self, cfg: DictConfig, data_split: str
  ):
      if "dataset" not in cfg or not isinstance(
          cfg.dataset, DictConfig
      ):
          raise ValueError(f"No dataset for {data_split}")
      if "dataloader_params" not in cfg or not isinstance(
          cfg.dataloader_params, DictConfig
      ):
          raise ValueError(f"No dataloader_params for {data_split}")
  
      dataset = instantiate(
          cfg.dataset,
          manifest=cfg.dataset.manifest,
          grapheme_field=cfg.dataset.grapheme_field,
          tokenizer=self.tokenizer,
          wordid_to_idx=self.wordid_to_idx,
          heteronym_dict=self.heteronym_dict,
          max_seq_len=self.max_seq_length,
          with_labels=True,
      )
  
      return torch.utils.data.DataLoader(
          dataset,
          collate_fn=dataset.collate_fn,
          **cfg.dataloader_params,
      )
  
imports: import json
  import os
  from typing import List, Optional
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from nemo.collections.common.losses import CrossEntropyLoss
  from nemo.collections.nlp.metrics.classification_report import ClassificationReport
  from nemo.collections.nlp.modules.common import TokenClassifier
  from nemo.collections.nlp.parts.utils_funcs import tensor2list
  from nemo.collections.tts.g2p.data.heteronym_classification import HeteronymClassificationDataset
  from nemo.collections.tts.g2p.utils import get_heteronym_spans, get_wordid_to_phonemes, read_wordids
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 18 for calling the HeteronymClassificationModel obj's underlying member method code with example usage: obj._setup_dataloader_from_config(cfg, data_split) and returns: torch