def findSubgroups(tree, cutoff=0.8):
    """
    Divide a tree into subgroups using a distance cutoff.
    Returns a list of lists with labels divided into subgroups.
    """
    subgroups = [[]]
    for i, target_i in enumerate(tree.get_terminals()):
        for j, target_j in enumerate(tree.get_terminals()):
            if i == j + 1:
                subgroups[-1].append(str(target_j))
                neighbour_distance = tree.distance(target_i, target_j)
                if neighbour_distance > cutoff:
                    subgroups.append([])
    subgroups[-1].append(str(target_j))
    return subgroups
