def METHOD_NAME(remap_op, maps_data, img_size):
    """
    Returns either a reference pipeline or a pipeline under test.
    If the remap_op argument is 'dali', this function returns a DALI pipeline under test.
    If the remap_op argument is 'cv', this function returns a reference DALI pipeline.
    :param remap_op: 'dali' or 'cv'.
    :param maps_data: List of ndarrays, which contains data for the remap parameters (maps).
    :param img_size: Shape of the remap parameters, but without the channels value (only spatial).
    :return: DALI Pipeline
    """
    img, _ = fn.readers.file(file_root=data_dir)
    img = fn.decoders.image(img)
    img = fn.resize(img, size=img_size)
    mapx, mapy = fn.external_source(source=maps_data, batch=True, cycle=True, num_outputs=2)
    if remap_op == 'dali':
        return fn.experimental.remap(img.gpu(), mapx.gpu(), mapy.gpu(),
                                     interp=DALIInterpType.INTERP_NN, device='gpu',
                                     pixel_origin="center")
    elif remap_op == 'cv':
        return fn.python_function(img, mapx, mapy, function=_cv_remap)
    else:
        raise ValueError("Unknown remap operator.")