class_docstr: Transformer-based (duplex) tagger model for TN/ITN.
code: def _setup_dataloader_from_config(
      self, cfg: DictConfig, data_split: str
  ):
      start_time = perf_counter()
      logging.info(f"Creating {data_split} dataset")
      input_file = cfg.data_path
      tagger_data_augmentation = cfg.get(
          "tagger_data_augmentation", False
      )
      dataset = TextNormalizationTaggerDataset(
          input_file=input_file,
          tokenizer=self.tokenizer,
          tokenizer_name=self.transformer_name,
          mode=self.mode,
          tagger_data_augmentation=tagger_data_augmentation,
          lang=self.lang,
          max_seq_length=self.max_sequence_len,
          use_cache=cfg.get("use_cache", False),
          max_insts=cfg.get("max_insts", -1),
      )
      data_collator = DataCollatorForTokenClassification(self.tokenizer)
      dl = torch.utils.data.DataLoader(
          dataset=dataset,
          batch_size=cfg.batch_size,
          shuffle=cfg.shuffle,
          collate_fn=data_collator,
      )
      running_time = perf_counter() - start_time
      logging.info(f"Took {running_time} seconds")
      return dl
  
imports: from time import perf_counter
  from typing import Dict, List, Optional
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from torch import nn
  from transformers import AutoModelForTokenClassification, AutoTokenizer, DataCollatorForTokenClassification
  from transformers.tokenization_utils_base import BatchEncoding
  from nemo.collections.nlp.data.text_normalization import TextNormalizationTaggerDataset, constants
  from nemo.collections.nlp.metrics.classification_report import ClassificationReport
  from nemo.collections.nlp.models.duplex_text_normalization.utils import has_numbers
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types import ChannelType, LogitsType, MaskType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 18 for calling the DuplexTaggerModel obj's underlying member method code with example usage: obj._setup_dataloader_from_config(cfg, data_split) and returns: dl