def METHOD_NAME():
    labels_key = ArrayKey("GT_LABELS")
    mask_key = ArrayKey("GT_MASK")
    affs_key = ArrayKey("GT_AFFINITIES")
    affs_mask_key = ArrayKey("GT_AFFINITIES_MASK")
    neighborhood = [
        Coordinate((-2, 0, 0)),
        Coordinate((0, -1, 0)),
        Coordinate((0, 0, 1)),
        Coordinate((1, 1, 1)),
    ]
    pipeline = ExampleSource() + AddAffinities(
        neighborhood,
        labels=labels_key,
        labels_mask=mask_key,
        affinities=affs_key,
        affinities_mask=affs_mask_key,
    )
    with build(pipeline):
        for i in range(10):
            request = BatchRequest()
            request.add(labels_key, (100, 16, 64))
            request.add(mask_key, (100, 16, 64))
            request.add(affs_key, (100, 16, 64))
            request.add(affs_mask_key, (100, 16, 64))
            batch = pipeline.request_batch(request)
            assert labels_key in batch.arrays
            assert mask_key in batch.arrays
            assert affs_key in batch.arrays
            assert affs_mask_key in batch.arrays
            labels = batch.arrays[labels_key]
            labels_mask = batch.arrays[mask_key]
            affs = batch.arrays[affs_key]
            affs_mask = batch.arrays[affs_mask_key]
            assert (len(neighborhood),) + labels.data.shape == affs.data.shape
            voxel_roi = Roi((0, 0, 0), labels.data.shape)
            for z, y, x in product(*[range(d) for d in labels.data.shape]):
                p = Coordinate((z, y, x))
                for n in range(len(neighborhood)):
                    pn = p + neighborhood[n]
                    if not voxel_roi.contains(pn):
                        continue
                    a = labels.data[p]
                    b = labels.data[pn]
                    masked = labels_mask.data[p] == 0 or labels_mask.data[pn] == 0
                    if a == b and a != 0 and b != 0:
                        assert (
                            affs.data[(n,) + p] == 1.0
                        ), "%s -> %s, %s -> %s, but is not 1" % (p, pn, a, b)
                    else:
                        assert (
                            affs.data[(n,) + p] == 0.0
                        ), "%s -> %s, %s -> %s, but is not 0" % (p, pn, a, b)
                    if masked:
                        assert (
                            affs_mask.data[(n,) + p] == 0.0
                        ), "%s or %s are masked, but mask is not 0" % (p, pn)
        request = BatchRequest()
        request.add(affs_key, (100, 16, 64))
        request.add(affs_mask_key, (100, 16, 64))
        batch = pipeline.request_batch(request)
        assert labels_key not in batch.arrays
        assert mask_key not in batch.arrays
        assert affs_key in batch.arrays
        assert affs_mask_key in batch.arrays