code: def _gdal_write_datasets(self, dst_ds, datasets):
          
          for i, band in enumerate(datasets['bands']):
              chn = datasets.sel(bands=band)
              bnd = dst_ds.GetRasterBand(i + 1)
              bnd.SetNoDataValue(0)
              bnd.WriteArray(chn.values)
docs: Write datasets in a gdal raster structure dts_ds