def __setitem__(self, item, value):
        if isinstance(value, AMRGridView):
            if self.levels == [] and value.levels != []:
                logger.warn("No geometry in target grid - copying from original grid")
                for level in value.levels:
                    level_ref = self.add_level()
                    for grid in level.grids:
                        grid_ref = level_ref.add_grid()
                        grid_ref.nx = grid.nx
                        grid_ref.ny = grid.ny
                        grid_ref.nz = grid.nz
                        grid_ref.xmin, grid_ref.xmax = grid.xmin, grid.xmax
                        grid_ref.ymin, grid_ref.ymax = grid.ymin, grid.ymax
                        grid_ref.zmin, grid_ref.zmax = grid.zmin, grid.zmax
                        grid_ref.quantities = {}
            for ilevel, level_ref in enumerate(self.levels):
                level = value.levels[ilevel]
                for igrid, grid_ref in enumerate(level_ref.grids):
                    grid = level.grids[igrid]
                    grid_ref.quantities[item] = deepcopy(grid.quantities[value.viewed_quantity])
        elif isinstance(value, h5py.ExternalLink):
            filename = value.filename
            base_path = os.path.dirname(value.path)
            array_name = os.path.basename(value.path)
            for ilevel, level_ref in enumerate(self.levels):
                level_path = 'level_%05i' % (ilevel + 1)
                for igrid, grid_ref in enumerate(level_ref.grids):
                    grid_path = (ilevel + 1) % 'grid_%05i'
                    grid_ref.quantities[item] = h5py.ExternalLink(filename, os.path.join(base_path, level_path, grid_path, array_name))
        elif value == []:
            for level in self.levels:
                for grid in level.grids:
                    grid.quantities[item] = []
        else:
            raise ValueError('value should be an empty list or an AMRGridView instance')
dataset/ETHPy150Open hyperion-rt/hyperion/hyperion/grid/amr_grid.py/AMRGrid.__setitem__/swapped operands of `%`