docstr: Preprocessed schema and dialogues and caches this
docstr_tok: ["Preprocessed","schema","and","dialogues","and","caches","this"]
code: def prepare_data(self):
      """
      Preprocessed schema and dialogues and caches this
      """
      if self.data_prepared:
          return
  
      if self._cfg.dataset.task == "sgd":
          self.dialogues_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,
          )
      elif self._cfg.dataset.task in ["assistant", "zero_shot"]:
          self.dialogues_processor = DialogueAssistantDataProcessor(
              data_dir=self._cfg.dataset.data_dir,
              tokenizer=self.tokenizer,
              cfg=self._cfg.dataset,
          )
      elif self._cfg.dataset.task == "design":
          self.dialogues_processor = DialogueDesignDataProcessor(
              data_dir=self._cfg.dataset.data_dir,
              tokenizer=self.tokenizer,
              cfg=self._cfg.dataset,
          )
      else:
          raise ValueError(
              "Only sgd, assistant, zero_shot, design supported for Dialogue GPT Classification Model"
          )
  
      self.data_prepared = True
  
imports: import collections
  import copy
  import os
  import random
  from typing import Dict, Optional, Union
  import numpy
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from torch.utils.data import DataLoader
  from transformers import AutoModelWithLMHead
  from nemo.collections.nlp.data.dialogue import DialogueGPTClassificationDataset, 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.metrics.classification_report import ClassificationReport
  from nemo.collections.nlp.metrics.dialogue_metrics import DialogueClassificationMetrics
  from nemo.collections.nlp.models.language_modeling.megatron_gpt_model import MegatronGPTModel
  from nemo.collections.nlp.models.language_modeling.megatron_gpt_prompt_learning_model import MegatronGPTPromptLearningModel
  from nemo.collections.nlp.models.nlp_model import NLPModel
  from nemo.collections.nlp.modules.common import VirtualPromptSource, VirtualPromptStyle
  from nemo.collections.nlp.modules.common.text_generation_utils import get_default_sampling_params, megatron_gpt_generate
  from nemo.collections.nlp.modules.common.transformer.text_generation import LengthParam
  from nemo.collections.nlp.parts.nlp_overrides import NLPSaveRestoreConnector
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 24 for calling the DialogueGPTClassificationModel obj's underlying member method code with example usage: obj.prepare_data() without return types