def place(self, entity, position):
        assert entity not in self.entity_positions
        self.entity_positions[entity] = position
        self.tiles[position].attach(entity)

        if entity.isa(Player):
            self.player = entity
        if IPortal in entity.type.components:
            dest = IPortal(entity).destination
            assert self.portal_index not in dest
            self.portal_index[dest] = entity
dataset/ETHPy150Open eevee/flax/flax/map.py/Map.place/swapped operands of `not in`