code: def iterate(coco, bs=8):
      image_ids = sorted(coco.imgs.keys())
      for i in range(0, len(image_ids), bs):
          X, targets = [], []
          for img_id in image_ids[i : i + bs]:
              x, original_size = image_load(
                  coco.loadImgs(img_id)[0]["file_name"]
              )
              X.append(x)
              annotations = coco.loadAnns(coco.getAnnIds(img_id))
              targets.append(
                  prepare_target(annotations, img_id, original_size)
              )
          yield np.array(X), targets
  
file_path: tinygrad/extra/datasets/openimages.py
imports: import os
  import math
  import json
  import numpy
  from PIL import Image
  import pathlib
  import boto3, botocore
  from tinygrad.helpers import fetch
  from tqdm import tqdm
  import pandas
  import concurrent.futures
label_desc: Use image node_id 9 for calling a global function with example usage: iterate(coco, bs) without return types