class_docstr: Base class for encoder decoder CTC-based models.
class_docstr_tok: ["Base","class","for","encoder","decoder","CTC-based","models","."]
code: def _setup_dataloader_from_config(self, config: Optional[Dict]):
      # Automatically inject args from model config to dataloader config
      audio_to_text_dataset.inject_dataloader_value_from_model_config(
          self.cfg, config, key="sample_rate"
      )
      audio_to_text_dataset.inject_dataloader_value_from_model_config(
          self.cfg, config, key="labels"
      )
      dataset = video_to_text_dataset.get_video_to_text_char_dataset_from_config(
          config=config,
          local_rank=self.local_rank,
          global_rank=self.global_rank,
          world_size=self.world_size,
          preprocessor_cfg=self._cfg.get("preprocessor", None),
      )
  
      if dataset is None:
          return None
  
      shuffle = config["shuffle"]
      if config.get("is_tarred", False):
          shuffle = False
  
      if hasattr(dataset, "collate_fn"):
          collate_fn = dataset.collate_fn
      else:
          collate_fn = dataset.datasets[0].collate_fn
  
      return torch.utils.data.DataLoader(
          dataset=dataset,
          batch_size=config["batch_size"],
          collate_fn=collate_fn,
          drop_last=config.get("drop_last", False),
          shuffle=shuffle,
          num_workers=config.get("num_workers", 0),
          pin_memory=config.get("pin_memory", False),
      )
  
imports: import copy
  import json
  import os
  import tempfile
  from math import ceil
  from typing import Dict, List, Optional, Union
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from tqdm.auto import tqdm
  from nemo.collections.asr.data import audio_to_text_dataset
  from nemo.collections.asr.losses.ctc import CTCLoss
  from nemo.collections.asr.metrics.wer import WER
  from nemo.collections.asr.models.asr_model import ASRModel, ExportableEncDecModel
  from nemo.collections.asr.parts.mixins import ASRModuleMixin, InterCTCMixin
  from nemo.collections.asr.parts.submodules.ctc_decoding import CTCDecoding, CTCDecodingConfig
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.multimodal.speech_cv.data import video_to_text_dataset
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.classes.mixins import AccessMixin
  from nemo.core.neural_types import LabelsType, LengthsType, LogprobsType, NeuralType, VideoSignal
  from nemo.utils import logging
label_desc: Use image node_id 5 for calling the VisualEncDecCTCModel obj's underlying member method code with example usage: obj._setup_dataloader_from_config(config) and returns: torch, None