code: def create_disk_folder_split(
      annotation_path: str, data_path: str, output_path: str
  ):
      """
      Create one split of the disk_folder format from the file at 'annotation_path' and the data stored
      in the folder 'data_path'.
      """
      assert os.path.exists(
          annotation_path
      ), f"Could not find annotation path {annotation_path}"
      assert os.path.exists(
          data_path
      ), f"Could not find data folder {data_path}"
  
      dataset = _ExtractMiddleFrameDataset(
          data_path=data_path, annotation_path=annotation_path
      )
      loader = DataLoader(
          dataset,
          num_workers=8,
          batch_size=1,
          collate_fn=lambda x: x[0],
      )
      for batch in tqdm(loader):
          mid_frame, image_name, category = batch
          category_folder = os.path.join(output_path, category)
          os.makedirs(category_folder, exist_ok=True)
          image_path = os.path.join(category_folder, image_name)
          with open(image_path, "w") as image_file:
              mid_frame.save(image_file)
  
file_path: vissl/extra_scripts/datasets/create_ucf101_data_files.py
imports: import argparse
  import os
  import ssl
  from contextlib import contextmanager
  from typing import List, Optional, Tuple
  from PIL import Image
  from torch.utils.data import DataLoader
  from torchvision.datasets.utils import download_url, extract_archive
  from tqdm import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: create_disk_folder_split(annotation_path, data_path, output_path) without return types