class_docstr: Dataset for supervised fine-tuning.
code: def __init__(self, data_path: str, tokenizer, multimodal_cfg: dict):
      super(LazySupervisedDataset, self).__init__()
      logging.warning("Loading data...")
      if data_path is not None:
          logging.warning("Loading data...")
          with open(data_path, "r") as file:
              list_data_dict = json.load(file)
      else:
          list_data_dict = []
  
      logging.warning("Formatting inputs...Skip in lazy mode")
      self.tokenizer = tokenizer
      self.list_data_dict = list_data_dict
      self.multimodal_cfg = multimodal_cfg
      self.conv_template = multimodal_cfg["conv_template"]
      self.image_folder = multimodal_cfg["image_folder"]
      self.processor = multimodal_cfg["image_processor"]
  
      self.image_loader = TarOrFolderImageLoader(self.image_folder)
  
imports: import copy
  import json
  import logging
  import os
  import re
  import tarfile
  from dataclasses import dataclass
  from typing import Any, Dict, List, Sequence, Union
  import torch
  import torch.nn.functional
  import transformers
  from einops import rearrange
  from omegaconf import DictConfig
  from PIL import Image
  from torch.utils.data import Dataset, default_collate
  from transformers import CLIPImageProcessor
  import nemo.collections.multimodal.data.neva.conversation
  from nemo.collections.nlp.modules.common.megatron.utils import get_ltor_masks_and_position_ids
label_desc: Use image node_id 1 to create a new LazySupervisedDataset object from inherited base classes: Dataset with example: obj = LazySupervisedDataset(data_path, tokenizer, multimodal_cfg)