def f():
    if query!=None:
        filtered_checked_columns = column_values[checked_column_names]
        for column in filtered_checked_columns:
            filtered_checked_columns = filtered_checked_columns[
                filtered_checked_columns[str(column)].isin(query_table[str(column)])]
        pa = len(filtered_checked_columns) / len(column_values)
        p_b_given_by_a = (filtered_columns.groupby(input_columns_names.tolist()).size() / len(column_values.index))
        return pa * p_b_given_by_a
    else:
        return column_values.groupby(input_columns_names.tolist()).size()/len(column_values.index)