code: def imagenet_prepare_train():
      images = os.listdir(Path(__file__).parent / "imagenet" / "train")
      for co, tarf in enumerate(images):
          # for each tar file found. Create a folder with its name. Extract into that folder. Remove tar file
          if Path(
              Path(__file__).parent / "imagenet" / "train" / images[co]
          ).is_file():
              images[co] = tarf[
                  :-4
              ]  # remove .tar from extracted tar files
              os.makedirs(
                  Path(__file__).parent
                  / "imagenet"
                  / "train"
                  / images[co],
                  exist_ok=True,
              )
              imagenet_extract(
                  Path(__file__).parent / "imagenet" / "train" / tarf,
                  Path(__file__).parent
                  / "imagenet"
                  / "train"
                  / images[co],
                  small=True,
              )
              os.remove(
                  Path(__file__).parent / "imagenet" / "train" / tarf
              )
  
imports: from tinygrad.helpers import fetch
  from pathlib import Path
  from tqdm import tqdm
  import tarfile, os
label_desc: Use image node_id 3 for calling a global function with example usage: imagenet_prepare_train() without return types