def METHOD_NAME(sec, curves):
    """
    Retrieve the index of the curve corresponding to the right security :sec:
    :param sec:  security level
    :param curves: output of `generate_and_verify`
    :return: index of the right curve
    """
    # TODO: Duplicated code from verify_curve
    for i in range(len(curves)):
        if curves[i][2] == sec:
            return i