Splits [(x1, y1), (x2, y2), ...] and gives to func

def error_unzip_helper(values, func, func_kwargs):
    '''Splits [(x1, y1), (x2, y2), ...] and gives to func'''
    x_values = [x for x, y in values]
    y_values = [y for x, y in values]
    result = func(x_values, y_values, **func_kwargs)
    if isinstance(result, float):
        return result
    else:
        return result[0]