def _x_cache(self, x, x_class, mode, estimated_records=None):
        if self.caches in x:
            current_mode, cache = self.caches[x]
            if current_mode == mode:
                return cache
            else:
                cache.close()
        cache = x_class(x, mode, estimated_records=estimated_records)
        self.caches[x] = mode, cache

        return cache
dataset/ETHPy150Open omniscale/imposm/imposm/cache/osm.py/OSMCache._x_cache/swapped operands of `in`