class_docstr: TextClassificationModel to be trained on two- or three-class textual entailment data, to be used for zero shot intent recognition.
class_docstr_tok: ["TextClassificationModel","to","be","trained","on","two-","or","three-class","textual","entailment","data",",","to","be","used","for","zero","shot","intent","recognition","."]
code: def _setup_dataloader_from_config(
      self, cfg: DictConfig, dataset_split
  ) -> "torch.utils.data.DataLoader":
      if self._cfg.dataset.task == "zero_shot":
          self.data_processor = DialogueAssistantDataProcessor(
              self.cfg.data_dir, self.tokenizer, cfg=self.cfg.dataset
          )
      elif self._cfg.dataset.task == "design":
          self.data_processor = DialogueDesignDataProcessor(
              data_dir=self._cfg.dataset.data_dir,
              tokenizer=self.tokenizer,
              cfg=self._cfg.dataset,
          )
      elif self._cfg.dataset.task == "sgd":
          self.data_processor = DialogueSGDDataProcessor(
              data_dir=self._cfg.dataset.data_dir,
              dialogues_example_dir=self._cfg.dataset.dialogues_example_dir,
              tokenizer=self.tokenizer,
              cfg=self._cfg.dataset,
          )
      else:
          raise ValueError(
              "Only zero_shot, design and sgd supported for Zero Shot Intent Model"
          )
  
      dataset = DialogueZeroShotIntentDataset(
          dataset_split,
          self.data_processor,
          self.tokenizer,
          self.cfg.dataset,  # this is the model.dataset cfg, which is diff from train_ds cfg etc
      )
  
      return torch.utils.data.DataLoader(
          dataset=dataset,
          collate_fn=dataset.collate_fn,
          batch_size=cfg.batch_size,
          shuffle=cfg.shuffle,
          num_workers=cfg.get("num_workers", 0),
          pin_memory=cfg.get("pin_memory", False),
          drop_last=cfg.get("drop_last", False),
      )
  
imports: import os
  from collections import defaultdict
  from typing import Dict, List, Optional, Union
  import numpy
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
  from nemo.collections.nlp.data.dialogue import DialogueSGDDataProcessor
  from nemo.collections.nlp.data.dialogue.data_processor.assistant_data_processor import DialogueAssistantDataProcessor
  from nemo.collections.nlp.data.dialogue.data_processor.design_data_processor import DialogueDesignDataProcessor
  from nemo.collections.nlp.data.dialogue.dataset.dialogue_zero_shot_intent_dataset import DialogueZeroShotIntentDataset
  from nemo.collections.nlp.data.zero_shot_intent_recognition.zero_shot_intent_dataset import ZeroShotIntentInferenceDataset, calc_class_weights_from_dataloader
  from nemo.collections.nlp.metrics.classification_report import ClassificationReport
  from nemo.collections.nlp.metrics.dialogue_metrics import DialogueGenerationMetrics
  from nemo.collections.nlp.models import TextClassificationModel
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the DialogueZeroShotIntentModel obj's underlying member method code with example usage: obj._setup_dataloader_from_config(cfg, dataset_split) and returns: torch