def generate_subsets(current_tree_bottom):
    current_distances = []
    subsets = []
    current_point = 0
    while (current_point < (len(current_tree_bottom) - 1)):
        current_distances.append((current_tree_bottom[(current_point + 1)][1] - current_tree_bottom[current_point][1]))
        current_point = (current_point + 1)
    for i in range(len(current_distances)):
        current_distances[i] = round(current_distances[i], 10)
    split_points = list(set(current_distances))
    for i in split_points:
        current_subset = []
        start_point = 0
        end_point = 1
        for j in current_distances:
            if (j >= i):
                current_subset.append(current_tree_bottom[start_point:end_point])
                start_point = end_point
            end_point = (end_point + 1)
        current_subset.append(current_tree_bottom[start_point:end_point])
        subsets.append(current_subset)
    subsets.append([current_tree_bottom])
    return subsets
def generate_subsets(current_tree_bottom):
    current_distances = []
    subsets = []
    current_point = 0
    while (current_point < (len(current_tree_bottom) - 1)):
        current_distances.append((current_tree_bottom[(current_point + 1)][1] - current_tree_bottom[current_point][1]))
        current_point = (current_point + 1)
    for i in range(len(current_distances)):
        current_distances[i] = round(current_distances[i], 10)
    split_points = list(set(current_distances))
    for i in split_points:
        current_subset = []
        start_point = 0
        end_point = 1
        for j in current_distances:
            if (j >= i):
                current_subset.append(current_tree_bottom[start_point:end_point])
                start_point = end_point
            end_point = (end_point + 1)
        current_subset.append(current_tree_bottom[start_point:end_point])
        subsets.append(current_subset)
    subsets.append([current_tree_bottom])
    return subsets