class_docstr: Designed for classification tasks such as intent/domain classification as well as slot tagging
  
  Dataset Class 
      1. Performs Model-dependent (but Data-independent) operations (tokenization etc)
      2. This can allow the same model preprocessing for multiple datasources
      3. Users can configurate which labels to use for modelling 
          (e.g. intent classification, slot filling or both together etc)
class_docstr_tok: ["Designed","for","classification","tasks","such","as","intent\/domain","classification","as","well","as","slot","tagging","Dataset","Class","1",".","Performs","Model-dependent","(","but","Data-independent",")","operations","(","tokenization","etc",")","2",".","This","can","allow","the","same","model","preprocessing","for","multiple","datasources","3",".","Users","can","configurate","which","labels","to","use","for","modelling","(","e.g",".","intent","classification",",","slot","filling","or","both","together","etc",")"]
code: def format_prompt(self, utterance, few_shot=0, idx=None):
      if self.cfg.prompt_template == "default":
          base_template = utterance + " " + self.label_type + ":"
      elif self.cfg.prompt_template == "i_want_to":
          base_template = utterance + " " + "I want to"
      elif self.cfg.prompt_template == "prompt_tuning":
          base_template = utterance + "\n" + self.label_type + ":"
      elif self.cfg.prompt_template == "prompt_tuning_with_options":
          base_template = (
              "possible intents: "
              + ", ".join(sorted(list(self.all_possible_labels)))
              + "\n\n"
              + utterance
              + "\n"
              + self.label_type
              + ":"
          )
  
      if few_shot > 0:
          few_shot_indices = random.sample(
              range(len(self.features)), few_shot + 1
          )
          few_shot_indices = [i for i in few_shot_indices if i != idx][
              :few_shot
          ]
          few_shot_samples = [
              self.lm_features[i] for i in few_shot_indices
          ]
          base_template = (
              self.tokenizer.tokenizer.pad_token.join(few_shot_samples)
              + self.tokenizer.tokenizer.pad_token
              + base_template
          )
      return base_template
  
file_path: NeMo/nemo/collections/nlp/data/dialogue/dataset/dialogue_gpt_classification_dataset.py
imports: import copy
  import random
  from collections import defaultdict
  import torch
  from nemo.collections.nlp.data.dialogue.dataset.dialogue_dataset import DialogueDataset
  from nemo.utils import logging
label_desc: Use image node_id 10 for calling the DialogueGPTClassificationDataset obj's underlying member method code with example usage: obj.format_prompt(utterance, few_shot, idx) and returns: base_template