code: def raster_weights(self, **kwargs):
          
          if self.weights is None:
              self.weights = raster_weights(self.raster, **kwargs)
          pass
docs: Compute neighbor weights for GeoRaster.
          See help(gr.raster_weights) for options
  
          Usage:
          geo.raster_weights(rook=True)