code: func optimizeSubIterators(its []graph.Iterator) []graph.Iterator {
  	var optIts []graph.Iterator
  	for _, it := range its {
  		o, changed := it.Optimize()
  		if changed {
  			optIts = append(optIts, o)
  		} else {
  			optIts = append(optIts, it.Clone())
  		}
  	}
  	return optIts
  }
docs: // optimizeSubIterators(l) takes a list of iterators and calls Optimize() on all
  // of them. It returns two lists -- the first contains the same list as l, where
  // any replacements are made by Optimize() and the second contains the originals
  // which were replaced.