code: func (it *HasA) Contains(ctx context.Context, val graph.Value) bool {
  	graph.ContainsLogIn(it, val)
  	it.runstats.Contains += 1
  	if clog.V(4) {
  		clog.Infof("Id is %v", it.qs.NameOf(val))
  	}
  	// TODO(barakmich): Optimize this
  	if it.resultIt != nil {
  		it.resultIt.Close()
  	}
  	it.resultIt = it.qs.QuadIterator(it.dir, val)
  	ok := it.NextContains(ctx)
  	if it.err != nil {
  		return false
  	}
  	return graph.ContainsLogOut(it, val, ok)
  }
docs: // Check a value against our internal iterator. In order to do this, we must first open a new
  // iterator of "quads that have `val` in our direction", given to us by the quad store,
  // and then Next() values out of that iterator and Contains() them against our subiterator.