<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def randomise_labels( self, inplace=False, ):
 """ Shuffles the leaf labels, but doesn't alter the tree structure """


        if not inplace:
            t = self.copy()
        else:
            t = self

        names = list(t.labels)
        random.shuffle(names)
        for l in t._tree.leaf_node_iter():
            l.taxon._label = names.pop()
        t._dirty = True
        return t