code: func (g *Graph) recomputeDestinationIndex_locked(n graph.Node) {
  	// don't maintain indices for nodes with few edges
  	edgeCount := g.graph.Degree(n)
  	if edgeCount < g.destinationEdgeThreshold {
  		delete(g.destinationEdgeIndex, n.ID())
  		return
  	}
  
  	// get or create the index
  	index := g.destinationEdgeIndex[n.ID()]
  	if index == nil {
  		index = newIntSet()
  	} else {
  		index.startNewGeneration()
  	}
  
  	// populate the index
  	g.graph.VisitFrom(n, func(dest graph.Node) bool {
  		if destinationEdge, ok := g.graph.EdgeBetween(n, dest).(*destinationEdge); ok {
  			index.mark(destinationEdge.DestinationID())
  		}
  		return true
  	})
  
  	// remove existing items no longer in the list
  	index.sweep()
  
  	if len(index.members) < g.destinationEdgeThreshold {
  		delete(g.destinationEdgeIndex, n.ID())
  	} else {
  		g.destinationEdgeIndex[n.ID()] = index
  	}
  }
docs: // must be called under write lock
  // recomputeDestinationIndex_locked recomputes the index of destination ids for the specified vertex