<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def chunks(self, shape=256, pad=False):
 """This method returns GeoRaster chunks out of the original raster. The chunck is evaluated only when fetched from the iterator. Useful when you want to iterate over a big rasters. Parameters shape : int or tuple, optional The shape of the chunk. Default: 256. pad : bool, optional When set to True all rasters will have the same shape, when False the edge rasters will have a shape less than the requested shape, according to what the raster actually had. Defaults to False. Returns ------- out: RasterChunk The iterator that has the raster and the offsets in it. """

        _self = self._raster_backed_by_a_file()
        if isinstance(shape, int):
            shape = (shape, shape)

        (width, height) = shape

        col_steps = int(_self.width / width)
        row_steps = int(_self.height / height)

        # when we the raster has an axis in which the shape is multipication
        # of the requested shape we don't need an extra step with window equal zero
        # in other cases we do need the extra step to get the reminder of the content
        col_extra_step = 1 if _self.width % width > 0 else 0
        row_extra_step = 1 if _self.height % height > 0 else 0

        for col_step in range(0, col_steps + col_extra_step):
            col_off = col_step * width
            if not pad and col_step == col_steps:
                window_width = _self.width % width
            else:
                window_width = width

            for row_step in range(0, row_steps + row_extra_step):
                row_off = row_step * height
                if not pad and row_step == row_steps:
                    window_height = _self.height % height
                else:
                    window_height = height
                window = Window(col_off=col_off, row_off=row_off, width=window_width, height=window_height)
                cur_raster = _self.get_window(window)
                yield RasterChunk(raster=cur_raster, offsets=(col_off, row_off))