def create_buckets(lower_bound, upper_bound, bins):
    """
    Create a dictionary with bins
    :param lower_bound: low range
    :param upper_bound: high range
    :param bins: number of buckets
    :return:
    """
    range_value = (upper_bound - lower_bound) / bins
    low = lower_bound
    buckets = []
    if bins == 1:
        buckets.append({'lower': low, 'upper': low + 1, 'bucket': 0})
    else:
        for i in range(0, bins):
            high = low + range_value
            buckets.append({'lower': low, 'upper': high, 'bucket': i})
            low = high
        buckets[bins - 1]['upper'] = upper_bound
    return buckets
