def get_process_metric(row, flag, ck_frame, metric, verbose=False):
    """
    Returns the value for the given metric for a particular source
    :param row: the data frame row for the test
    :param flag: true if that's a production class; false if a test
    :param ck_frame: the frame with all the ck metrics
    :param metric: the given metric

    """
    if flag:
        name = 'class_name'
    else:
        name = 'test_name'
    cut = row[name]

    aux = ck_frame[ck_frame['class'] == cut][metric]
    if len(aux) != 1 and verbose:
        print("\t* Two entries for {}".format(cut))
    return aux.iloc[0]