code: def main(train_dataset, val_dataset):
      datasets = {
          "train": torchvision.datasets.CIFAR10(
              "/tmp", train=True, download=True
          ),
          "test": torchvision.datasets.CIFAR10(
              "/tmp", train=False, download=True
          ),
      }
  
      for name, ds in datasets.items():
          path = train_dataset if name == "train" else val_dataset
          writer = DatasetWriter(
              path, {"image": RGBImageField(), "label": IntField()}
          )
          writer.from_indexed_dataset(ds)
  
file_path: ffcv/examples/cifar/write_datasets.py
imports: from argparse import ArgumentParser
  from typing import List
  import time
  import numpy
  from tqdm import tqdm
  import torch
  import torchvision
  from fastargs import get_current_config
  from fastargs.decorators import param
  from fastargs import Param, Section
  from fastargs.validation import And, OneOf
  from ffcv.writer import DatasetWriter
  from ffcv.fields import IntField, RGBImageField
label_desc: Use image node_id 1 for calling a global function with example usage: main(train_dataset, val_dataset) without return types