code: def slice(self, key):
          
          if not self.all_same_area:
              raise RuntimeError("'Scene' has different areas and cannot "
                                 "be usefully sliced.")
          # slice
          new_scn = self.copy()
          new_scn.wishlist = self.wishlist
          for area, dataset_ids in self.iter_by_area():
              if area is not None:
                  # assume dimensions for area are y and x
                  one_ds = self[dataset_ids[0]]
                  area_key = tuple(sl for dim, sl in zip(one_ds.dims, key) if dim in ['y', 'x'])
                  new_area = area[area_key]
              else:
                  new_area = None
              new_scn._slice_datasets(dataset_ids, key, new_area)
          return new_scn
docs: Slice Scene by dataset index.
  
          .. note::
  
              DataArrays that do not have an ``area`` attribute will not be
              sliced.