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 == "ms_marco":
          self.dialogues_processor = DialogueMSMarcoDataProcessor(
              data_dir=self._cfg.dataset.data_dir,
              tokenizer=self.tokenizer,
              cfg=self._cfg.dataset,
          )
      elif self._cfg.dataset.task == "mellon_qa":
          self.dialogues_processor = DialogueMellonQADataProcessor(
              data_dir=self._cfg.dataset.data_dir,
              tokenizer=self.tokenizer,
              cfg=self._cfg.dataset,
          )
      else:
          raise ValueError(
              "Only ms_marco and mellon_qa supported for Dialogue GPT Generation Model"
          )
  
      self.data_prepared = True
  
imports: import copy
  import os
  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.data_processor.mellon_qa_data_processor import DialogueMellonQADataProcessor
  from nemo.collections.nlp.data.dialogue.data_processor.ms_marco_data_processor import DialogueMSMarcoDataProcessor
  from nemo.collections.nlp.data.dialogue.dataset.dialogue_gpt_generation_dataset import DialogueGPTGenerationDataset
  from nemo.collections.nlp.metrics.dialogue_metrics import DialogueGenerationMetrics
  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.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 17 for calling the DialogueGPTGenerationModel obj's underlying member method code with example usage: obj.prepare_data() without return types