'Flattens nested clusters to a list, down to the given depth.
Cluster((1, Cluster((2, Cluster((3, 4)))))).flatten(1) => [1, 2, Cluster(3, 4)].'

def flatten(self, depth=1000):

    a = []
    for item in self:
        if (isinstance(item, Cluster) and (depth > 0)):
            a.extend(item.flatten((depth - 1)))
        else:
            a.append(item)
    return a
