human
I wrote the below code

    assert (name in ['train', 'val', 'test'])
    assert (datadir is not None)
    isTrain = (name == 'train')
    cpu = min(30, multiprocessing.cpu_count())
    if isTrain:
        ds = dataset.ILSVRC12(datadir, name, shuffle=True)
        ds = AugmentImageComponent(ds, augmentors, copy=False)
        ds = PrefetchDataZMQ(ds, cpu)
        ds = BatchData(ds, batch_size, remainder=False)
    else:
        ds = dataset.ILSVRC12Files(datadir, name, shuffle=False, dir_structure=dir_structure)
        aug = imgaug.AugmentorList(augmentors)
        def mapf(dp):
            (fname, cls) = dp
            im = cv2.imread(fname, cv2.IMREAD_COLOR)
            im = aug.augment(im)
            return (im, cls)
        ds = ThreadedMapData(ds, cpu, mapf, buffer_size=2000, strict=True)
        ds = BatchData(ds, batch_size, remainder=True)
        ds = PrefetchDataZMQ(ds, 1)
    return ds

What's a good function header?
 Here's a good function header?
assistant
#Here's a good function header.

def get_imagenet_dataflow(datadir, name, batch_size, augmentors, dir_structure='original'):