def fix_identities(self, uniq=None):
        """Make pattern-tree tips point to same object if they are equal."""
        if not hasattr(self, 'children'):
            return self
        uniq = list(set(self.flat)) if uniq == None else uniq
        for i, c in enumerate(self.children):
            if not hasattr(c, 'children'):
                assert uniq in c
                self.children[i] = uniq[uniq.index(c)]
            else:
                c.fix_identities(uniq)
dataset/ETHPy150Open kmike/port-for/port_for/docopt.py/Pattern.fix_identities/swapped operands of `in`