docs: def _resize(self, ratio_x, ratio_y, resampling):
          """Return raster resized by ratio."""
          new_width = int(np.ceil(self.width * ratio_x))
          new_height = int(np.ceil(self.height * ratio_y))
  
          dest_affine = self.affine * Affine.scale(1 / ratio_x, 1 / ratio_y)
          if self.not_loaded():
              window = rasterio.windows.Window(0, 0, self.width, self.height)
              resized_raster = self.get_window(window, xsize=new_width, ysize=new_height, resampling=resampling)
          else:
              resized_raster = self._reproject(new_width, new_height, dest_affine, resampling=resampling)
          return resized_raster