def METHOD_NAME(pipeline, gt_pipeline, batch_size, video_length):
    global_sample_id = 0
    batch_gpu, = pipeline.run()
    batch = batch_gpu.as_cpu()
    for sample_id in range(batch_size):
        global_sample_id = global_sample_id + 1
        sample = batch.at(sample_id)
        for frame_id in range(video_length):
            frame = sample[frame_id]
            gt_frame = gt_pipeline.run()[0].as_cpu().as_array()[0]
            if gt_frame.shape == frame.shape:
                assert (gt_frame == frame).all(), "Images are not equal"
            else:
                assert gt_frame.shape == frame.shape, \
                    f"Shapes are not equal: {gt_frame.shape} != {frame.shape}"