<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def regrid(self, axes, coordsys, outname="", overwrite=True, outshape=(), interpolation="linear", decimate=10, replicate=False, refchange=True, forceregrid=False):
 """Regrid the image to a new image object. Regrid the image on the given axes to the given coordinate system. The output is stored in the given file; it no file name is given a temporary image is made. If the output shape is empty, the old shape is used. `replicate=True` means replication rather than regridding. """

        return image(self._regrid(self._adaptAxes(axes),
                                  outname, overwrite,
                                  outshape, coordsys.dict(),
                                  interpolation, decimate, replicate,
                                  refchange, forceregrid))