<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mask_by_value(self, nodata):
 """ Return raster with a mask calculated based on provided value. Only pixels with value=nodata will be masked. :param nodata: value of the pixels that should be masked :return: GeoRaster2 """

        return self.copy_with(image=np.ma.masked_array(self.image.data, mask=self.image.data == nodata))