code: def create_disk_folder_split(
      dat_path: str, info_path: str, output_path: str, target_transform
  ):
      training_images = parse_image_array(
          read_small_norb_format(dat_path)
      )
      training_target = target_transform(
          read_small_norb_format(info_path)
      )
      with tqdm(total=training_target.shape[0]) as progress_bar:
          for i in range(training_target.shape[0]):
              image = Image.fromarray(
                  training_images[i], mode="L"
              ).convert(mode="RGB")
              elevation = str(training_target[i])
              image_folder = os.path.join(output_path, elevation)
              os.makedirs(image_folder, exist_ok=True)
              image.save(os.path.join(image_folder, f"image_{i}.jpg"))
              progress_bar.update(1)
  
file_path: vissl/extra_scripts/datasets/create_small_norb_elevation_data_files.py
imports: import argparse
  import os
  import numpy
  from PIL import Image
  from tqdm import tqdm
  from vissl.utils.download import download_and_extract_archive
label_desc: Use image node_id 8 for calling a global function with example usage: create_disk_folder_split(dat_path, info_path, output_path, target_transform) without return types