class_docstr: Creates a dataset to use for the task of joint intent
  and slot classification with pretrained model.
  
  For a dataset to use during inference without labels, see
  IntentSlotDataset.
class_docstr_tok: ["Creates","a","dataset","to","use","for","the","task","of","joint","intent","and","slot","classification","with","pretrained","model",".","For","a","dataset","to","use","during","inference","without","labels",",","see","IntentSlotDataset","."]
docstr: Args:
      dataset_split: dataset split
      dialogues_processor: Data generator for dialogues
      tokenizer: tokenizer
      cfg: config container for dataset
docstr_tok: ["Args",":","dataset_split",":","dataset","split","dialogues_processor",":","Data","generator","for","dialogues","tokenizer",":","tokenizer","cfg",":","config","container","for","dataset"]
code: def __init__(
      self,
      dataset_split: str,
      dialogues_processor: object,
      tokenizer,
      cfg,
  ):
      """
      Args:
          dataset_split: dataset split
          dialogues_processor: Data generator for dialogues
          tokenizer: tokenizer
          cfg: config container for dataset
      """
      self.cfg = cfg
      self.all_possible_labels = dialogues_processor.intents
      self.label_to_label_id = {
          self.all_possible_labels[i]: i
          for i in range(len(self.all_possible_labels))
      }
      self.all_possible_slots = dialogues_processor.slots
      self.slot_name_to_slot_id = {
          self.all_possible_slots[i]: i
          for i in range(len(self.all_possible_slots))
      }
      self.empty_slot_name = "O"
  
      self.features = dialogues_processor.get_dialog_examples(
          dataset_split
      )
      self.features = (
          self.features
          if self.cfg.num_samples == -1
          else self.features[: self.cfg.num_samples]
      )
  
      queries = [feature.data["utterance"] for feature in self.features]
      if self.cfg.do_lowercase:
          queries = [query.lower() for query in queries]
      intents = [
          self.label_to_label_id[feature.data["labels"]["intent"]]
          for feature in self.features
      ]
      word_level_slots = [
          self.convert_slot_position_to_slot_ids(feature.data)
          for feature in self.features
      ]
  
      features = DialogueBERTDataset.get_features(
          queries,
          self.cfg.max_seq_length,
          tokenizer,
          pad_label=self.cfg.pad_label,
          word_level_slots=word_level_slots,
          ignore_extra_tokens=self.cfg.ignore_extra_tokens,
          ignore_start_end=self.cfg.ignore_start_end,
      )
  
      self.all_input_ids = features[0]
      self.all_segment_ids = features[1]
      self.all_input_mask = features[2]
      self.all_loss_mask = features[3]
      self.all_subtokens_mask = features[4]
      self.all_slots = features[5]
      self.all_intents = intents
  
imports: from typing import Dict, Optional
  import numpy
  from nemo.collections.nlp.data.data_utils import get_stats
  from nemo.collections.nlp.data.dialogue.dataset.dialogue_dataset import DialogueDataset
  from nemo.core.neural_types import ChannelType, LabelsType, MaskType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 2 to create a new DialogueBERTDataset object from inherited base classes: DialogueDataset with example: obj = DialogueBERTDataset(dataset_split, dialogues_processor, tokenizer, cfg)