def METHOD_NAME(device, batch_size, layout, shape, center_x, center_y, center_z):
    eii1 = RandomDataIterator(batch_size, shape=shape, dtype=np.float32)
    pipe = CoordFlipPipeline(device, batch_size, iter(eii1),
                             layout, center_x, center_y, center_z)
    pipe.build()
    for i in range(30):
        outputs = pipe.run()
        for sample in range(batch_size):
            in_coords = outputs[0].at(sample)
            if device == 'gpu':
                out_coords = outputs[1].as_cpu().at(sample)
            else:
                out_coords = outputs[1].at(sample)
            if in_coords.shape == () or in_coords.shape[0] == 0:
                assert out_coords.shape == () or out_coords.shape[0] == 0
                continue
            flip_x = outputs[2].at(sample)
            flip_y = outputs[3].at(sample)
            flip_z = None
            if len(layout) == 3:
                flip_z = outputs[4].at(sample)
            _, ndim = in_coords.shape
            flip_dim = [flip_x, flip_y]
            if ndim == 3:
                flip_dim.append(flip_z)
            center_dim = [center_x, center_y]
            if ndim == 3:
                center_dim.append(center_z)
            expected_out_coords = np.copy(in_coords)
            for d in range(ndim):
                if flip_dim[d]:
                    expected_out_coords[:, d] = 2 * center_dim[d] - in_coords[:, d]
            np.testing.assert_allclose(out_coords[:, d], expected_out_coords[:, d])