def cmp_key_columns(_left, _right, _key_columns):
    """
    This functions compares the columns in the specified key fields only and returns data usable in a </=/>-comparer
    """
    for _curr_key_column in _key_columns:
        if _left[_curr_key_column] < _right[_curr_key_column]:
            return -1
        elif _left[_curr_key_column] > _right[_curr_key_column]:
            return 1
    return 0
