code: def imagenet_prepare_val():
      # Read in the labels file
      with open(
          Path(__file__).parent
          / "imagenet"
          / "imagenet_2012_validation_synset_labels.txt",
          "r",
      ) as f:
          labels = f.read().splitlines()
      f.close()
      # Get a list of images
      images = os.listdir(Path(__file__).parent / "imagenet" / "val")
      images.sort()
      # Create folders and move files into those
      for co, dir in enumerate(labels):
          os.makedirs(
              Path(__file__).parent / "imagenet" / "val" / dir,
              exist_ok=True,
          )
          os.replace(
              Path(__file__).parent / "imagenet" / "val" / images[co],
              Path(__file__).parent
              / "imagenet"
              / "val"
              / dir
              / images[co],
          )
      os.remove(
          Path(__file__).parent
          / "imagenet"
          / "imagenet_2012_validation_synset_labels.txt"
      )
  
imports: from tinygrad.helpers import fetch
  from pathlib import Path
  from tqdm import tqdm
  import tarfile, os
label_desc: Use image node_id 2 for calling a global function with example usage: imagenet_prepare_val() without return types