def add(self, w):
    if (not w):
        return
    hash = (lambda e: enumerate(map(self.topx, list(zip(e.x, e.y)))))
    for (i, px) in hash(w):
        self._map.setdefault(px, set()).add((w, i))
    for (i, px) in hash(w):
        for x in [e for e in self._map[px] if (e[0] == w)][1:]:
            self._map[px].remove(x)
def add(self, w):
    if (not w):
        return
    hash = (lambda e: enumerate(map(self.topx, list(zip(e.x, e.y)))))
    for (i, px) in hash(w):
        self._map.setdefault(px, set()).add((w, i))
    for (i, px) in hash(w):
        for x in [e for e in self._map[px] if (e[0] == w)][1:]:
            self._map[px].remove(x)