code: def _prepare_rasters(rasters, merge_strategy, first, resampling=Resampling.nearest):
      # type: (List[GeoRaster2], MergeStrategy, GeoRaster2, Resampling) -> Tuple[IndexedSet[str], List[Optional[_Raster]]]
      
      # Create list of prepared rasters
      all_band_names = IndexedSet(first.band_names)
      projected_rasters = []
      for raster in rasters:
          projected_raster = _prepare_other_raster(first, raster, resampling=resampling)
  
          # Modify the bands only if an intersecting raster was returned
          if projected_raster:
              if merge_strategy is MergeStrategy.INTERSECTION:
                  all_band_names.intersection_update(projected_raster.band_names)
              elif merge_strategy is MergeStrategy.UNION:
                  all_band_names.update(projected_raster.band_names)
  
          # Some rasters might be None. In this way, we still retain the original order
          projected_rasters.append(projected_raster)
  
      return all_band_names, projected_rasters
docs: Prepares the rasters according to the baseline (first) raster and the merge strategy.
  
      The baseline (first) raster is used to crop and reproject the other rasters,
      while the merge strategy is used to compute the bands of the result. These
      are returned for diagnostics.