code: func (s *stateV4) normalize() {
  	sort.Stable(sortResourcesV4(s.Resources))
  	for _, rs := range s.Resources {
  		sort.Stable(sortInstancesV4(rs.Instances))
  	}
  }
docs: // normalize makes some in-place changes to normalize the way items are
  // stored to ensure that two functionally-equivalent states will be stored
  // identically.