code: def write_ndarray(self, result, dst_paths, nodata=None, compress='lzw'):
          
  
          assert len(dst_paths) == result.shape[2]
          assert result.shape[0] == self._height
          assert result.shape[1] == self._width
          assert result.shape[2] == len(dst_paths)
          with rasterio.open(self._mrio._get_template_for_given_resolution(self._mrio.dst_res, "path")) as src_layer:
              pass # later we need src_layer for src_layer.window_transform(win)
          for i, pth in enumerate(dst_paths):
              dst_path_chunk = self.get_chunk_path_from_layer_path(pth, self.ji)
  
              result_layer_i = result[:, :, [i]]
              assert result_layer_i.shape[2] == 1
              kwargs = self._mrio._get_template_for_given_resolution(
                  res=self._mrio.dst_res, return_="meta").copy()
              kwargs.update({"driver": "GTiff",
                             "compress": compress,
                             "nodata": nodata,
                             "height": self._height,
                             "width": self._width,
                             "dtype": result_layer_i.dtype,
                             "transform": src_layer.window_transform(self._window)})
              with rasterio.open(dst_path_chunk, "w", **kwargs) as dst:
                  dst.write(result_layer_i[:, :, 0], 1)
docs: Write results (ndarray) to disc.