code: def make_supervised_data_module(tokenizer, model_cfg) -> Dict:
      """Make dataset and collator for supervised fine-tuning."""
      data_cfg = model_cfg.data
      mm_cfg = model_cfg.mm_cfg
      add_extra_token = 1
      if getattr(model_cfg, "no_seqlen_plus_one_input_tokens", False):
          add_extra_token = 0
      if mm_cfg.vision_encoder.from_hf:
          image_processor = CLIPImageProcessor.from_pretrained(
              mm_cfg.vision_encoder.from_pretrained,
              torch_dtype=torch.bfloat16,
          )
      else:
          # TODO(yuya): Fix this hard-code for our own CLIP
          image_processor = CLIPImageProcessor.from_pretrained(
              "openai/clip-vit-large-patch14",
              torch_dtype=torch.bfloat16,
          )
      train_dataset = NevaDataset(
          tokenizer=tokenizer,
          data_path=data_cfg.data_path,
          multimodal_cfg=dict(
              is_multimodal=data_cfg.is_multimodal,
              sep_image_conv_front=data_cfg.sep_image_conv_front,
              conv_template=data_cfg.get("conv_template", "nvgpt"),
              image_token_len=data_cfg.image_token_len,
              image_folder=data_cfg.image_folder,
              image_aspect_ratio=data_cfg.image_aspect_ratio,
              use_im_start_end=getattr(
                  model_cfg.mm_cfg, "use_im_start_end", False
              ),
              image_processor=image_processor,
              add_extra_token=add_extra_token,
              context_length=model_cfg.encoder_seq_length,
          ),
      )
      # data_collator = DataCollatorForSupervisedDataset(tokenizer=tokenizer)
      return dict(
          train_dataset=train_dataset, eval_dataset=train_dataset
      )
  
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 6 for calling a global function with example usage: make_supervised_data_module(tokenizer, model_cfg) and returns: dict