code: def run_test(length, pipeline, should_compile=False, aug_name=""):
      my_dataset = Subset(
          CIFAR10(root="/tmp", train=True, download=True), range(length)
      )
  
      with NamedTemporaryFile() as handle:
          name = handle.name
          writer = DatasetWriter(
              name,
              {
                  "image": RGBImageField(
                      write_mode="smart", max_resolution=32
                  ),
                  "label": IntField(),
              },
              num_workers=2,
          )
  
          writer.from_indexed_dataset(my_dataset, chunksize=10)
  
          Compiler.set_enabled(should_compile)
  
          loader = Loader(
              name,
              batch_size=7,
              num_workers=2,
              pipelines={
                  "image": pipeline,
                  "label": [IntDecoder(), ToTensor(), Squeeze()],
              },
              drop_last=False,
          )
  
          unaugmented_loader = Loader(
              name,
              batch_size=7,
              num_workers=2,
              pipelines={
                  "image": UNAUGMENTED_PIPELINE,
                  "label": [IntDecoder(), ToTensor(), Squeeze()],
              },
              drop_last=False,
          )
  
          tot_indices = 0
          tot_images = 0
          for it_num, (
              (images, labels),
              (original_images, original_labels),
          ) in enumerate(zip(loader, unaugmented_loader)):
              tot_indices += labels.shape[0]
              tot_images += images.shape[0]
  
              for label, original_label in zip(labels, original_labels):
                  assert_that(label).is_equal_to(original_label)
  
              if SAVE_IMAGES and it_num == 0:
                  save_image(
                      make_grid(
                          ch.concat([images, original_images]) / 255.0,
                          images.shape[0],
                      ),
                      os.path.join(
                          IMAGES_TMP_PATH,
                          aug_name + "-" + str(uuid.uuid4()) + ".jpeg",
                      ),
                  )
  
          assert_that(tot_indices).is_equal_to(len(my_dataset))
          assert_that(tot_images).is_equal_to(len(my_dataset))
  
imports: import os
  import uuid
  import numpy
  import torch
  from torch.utils.data import Dataset
  from torchvision import transforms
  from assertpy import assert_that
  from tempfile import NamedTemporaryFile
  from torchvision.datasets import CIFAR10
  from torchvision.utils import save_image, make_grid
  from torch.utils.data import Subset
  from ffcv.fields.basics import IntDecoder
  from ffcv.fields.rgb_image import SimpleRGBImageDecoder
  from ffcv.writer import DatasetWriter
  from ffcv.fields import IntField, RGBImageField
  from ffcv.loader import Loader
  from ffcv.pipeline.compiler import Compiler
  from ffcv.transforms import *
label_desc: Use image node_id 1 for calling a global function with example usage: run_test(length, pipeline, should_compile, aug_name) without return types