class_docstr: Dialogue Nearest Neighbour Model identifies the intent of an utterance using the cosine similarity between sentence embeddings of the utterance and various label descriptions 
class_docstr_tok: ["Dialogue","Nearest","Neighbour","Model","identifies","the","intent","of","an","utterance","using","the","cosine","similarity","between","sentence","embeddings","of","the","utterance","and","various","label","descriptions"]
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 = DialogueNearestNeighbourDataset(
          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 typing import Optional
  import numpy
  import torch
  import torch.nn.functional
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from transformers import AutoModel
  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_nearest_neighbour_dataset import DialogueNearestNeighbourDataset
  from nemo.collections.nlp.metrics.classification_report import ClassificationReport
  from nemo.collections.nlp.metrics.dialogue_metrics import DialogueGenerationMetrics
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the DialogueNearestNeighbourModel obj's underlying member method code with example usage: obj._setup_dataloader_from_config(cfg, dataset_split) and returns: torch