code: func (*And) optimizeReplacement(its []graph.Iterator) graph.Iterator {
  	// If we were created with no SubIterators, we're as good as Null.
  	if len(its) == 0 {
  		return NewNull()
  	}
  	if len(its) == 1 {
  		// When there's only one iterator, there's only one choice.
  		return its[0]
  	}
  	// If any of our subiterators, post-optimization, are also Null, then
  	// there's no point in continuing the branch, we will have no results
  	// and we are null as well.
  	if hasAnyNullIterators(its) {
  		return NewNull()
  	}
  
  	// If we have one useful iterator, use that.
  	it := hasOneUsefulIterator(its)
  	if it != nil {
  		return it
  	}
  	return nil
  }
docs: // Find if there is a single subiterator which is a valid replacement for this
  // And.