code: func BuildIterator(qs graph.QuadStore, s Shape) graph.Iterator {
  	qs = graph.Unwrap(qs)
  	if s != nil {
  		if debugShapes || clog.V(2) {
  			clog.Infof("shape: %#v", s)
  		}
  		s, _ = Optimize(s, qs)
  		if debugOptimizer || clog.V(2) {
  			clog.Infof("optimized: %#v", s)
  		}
  	}
  	if IsNull(s) {
  		return iterator.NewNull()
  	}
  	return s.BuildIterator(qs)
  }
docs: // BuildIterator optimizes the shape and builds a corresponding iterator tree.