class_docstr: Dataset for supervised fine-tuning.
class_docstr_tok: ["Dataset","for","supervised","fine-tuning","."]
code: def __init__(
      self,
      data_path: str,
      data_path2: str,
      data_path3: str,
      tokenizer: transformers.PreTrainedTokenizer,
      data_args: DataArguments,
  ):
      super(LazySupervisedDataset, self).__init__()
      self.data_args = data_args
      list_vqa_dict = json.load(open(data_path, "r"))
      data_path3_1 = os.path.join(
          data_path3, "lmdb_train-00000-of-00002.json"
      )
      data_path3_2 = os.path.join(
          data_path3, "lmdb_train-00001-of-00002.json"
      )
      list_aes_1_dict = json.load(open(data_path3_1, "r"))
      list_aes_2_dict = json.load(open(data_path3_2, "r"))
      with open(
          os.path.join(
              self.data_args.image_folder2, "laion_3m_prompt.json"
          ),
          "r",
          encoding="utf-8",
      ) as fr:
          self.prompt_dict_ori = json.load(fr)
      list_coco_dict = json.load(
          open(os.path.join(data_path2, "train.json"), "r")
      )
      rank0_print("Formatting inputs...Skip in lazy mode")
      self.tokenizer = tokenizer
      self.list_vqa_dict = list_vqa_dict
      self.list_coco_dict = list_coco_dict
  
      self.list_aes_1_dict = list_aes_1_dict
      self.list_aes_2_dict = list_aes_2_dict
  
      self.len1 = len(self.list_vqa_dict)
      self.len_vqa = len(self.list_vqa_dict)
      self.len_coco = len(self.list_coco_dict)
      self.len_aes_1 = len(self.list_aes_1_dict)
      self.len_aes_2 = len(self.list_aes_2_dict)
      self.txn1 = LoadImageFromLmdb(
          os.path.join(
              self.data_args.image_folder2, "lmdb_train-00000-of-00002"
          )
      )
      self.txn2 = LoadImageFromLmdb(
          os.path.join(
              self.data_args.image_folder2, "lmdb_train-00001-of-00002"
          )
      )
      self.len_aes = self.len_aes_1 + self.len_aes_2
      self.ratio_aes = self.len_aes / (self.len_coco + self.len_aes)
  
      self.gen_mask = get_mask_generator()
      self.len1 = int(1 * self.len1)
      self.len2 = int(1 * self.len1)
      self.len3 = int(1 * self.len1)
      self.len4 = int(1 * self.len1)
  
imports: import os
  import copy
  from dataclasses import dataclass, field
  import json
  import logging
  import pathlib
  from typing import Dict, Optional, Sequence, List
  import torch
  import transformers
  from llmga.llava.constants import IGNORE_INDEX, IMAGE_TOKEN_INDEX, DEFAULT_IMAGE_TOKEN, DEFAULT_IM_START_TOKEN, DEFAULT_IM_END_TOKEN, DEFAULT_OUTPUT_START_TOKEN, DEFAULT_OUTPUT_END_TOKEN
  from torch.utils.data import Dataset
  from llmga.llava.train.llava_trainer import LLaVATrainer
  from llmga.llava import conversation
  from llmga.llava.model import *
  from llmga.llava.mm_utils import tokenizer_image_token
  from PIL import Image
  from llmga.llava.masks.make_mask import get_mask_generator
  from llmga.llava.prompt_temp import outpaint_prompt, inpaint_prompt, textextend_prompt, regen_prompt, ques_prompt, textextend_prompt2
  import random
  import numpy
  import lmdb
  import io
  import pytextrank
  from torchvision import transforms
label_desc: Use image node_id 1 to create a new LazySupervisedDataset object from inherited base classes: Dataset with example: obj = LazySupervisedDataset(data_path, data_path2, data_path3, tokenizer, data_args)