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",")"]
docstr: Serialize slots into a linear text
  
  Args:
      slots: dict with each slot_name as key and possible slot values as value
  Returns:
      linear_slots: text based representation of slot names and values
docstr_tok: ["Serialize","slots","into","a","linear","text","Args",":","slots",":","dict","with","each","slot_name","as","key","and","possible","slot","values","as","value","Returns",":","linear_slots",":","text","based","representation","of","slot","names","and","values"]
code: def linearize_slots(slots):
      """
      Serialize slots into a linear text
  
      Args:
          slots: dict with each slot_name as key and possible slot values as value
      Returns:
          linear_slots: text based representation of slot names and values
      """
      if not slots:
          return "None"
      return ", ".join(
          [
              "{}({})".format(
                  slot, value if isinstance(value, str) else value[0]
              )
              for slot, value in slots.items()
          ]
      )
  
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 7 for calling the DialogueGPTClassificationDataset obj's underlying member method code with example usage: obj.linearize_slots(slots) and returns: str, str