@staticmethod
def _add_function_approximation_to_calibration_proto(calibration_proto, x_array, y_array, class_id):
    'Adds a function approximation to calibration proto for a class id.'
    if (class_id is not None):
        function_approximation = calibration_proto.class_id_function_approximations.class_id_xy_pairs_map[class_id]
    else:
        function_approximation = calibration_proto.function_approximation.x_y_pairs
    for (x, y) in zip(x_array, y_array):
        x_y_pair_message = function_approximation.x_y_pair.add()
        x_y_pair_message.x = x
        x_y_pair_message.y = y
Adds a function approximation to calibration proto for a class id.
@staticmethod
def _add_function_approximation_to_calibration_proto(calibration_proto, x_array, y_array, class_id):
    
    if (class_id is not None):
        function_approximation = calibration_proto.class_id_function_approximations.class_id_xy_pairs_map[class_id]
    else:
        function_approximation = calibration_proto.function_approximation.x_y_pairs
    for (x, y) in zip(x_array, y_array):
        x_y_pair_message = function_approximation.x_y_pair.add()
        x_y_pair_message.x = x
        x_y_pair_message.y = y