// NewNodeID returns a new unique ID for a node to be added to g. The returned ID does
// not become a valid ID in g until it is added to g.
353802
func (g *UndirectedGraph) NewNodeID() int {
	if len(g.nodes) == 0 {
		return 0
	}
	if len(g.nodes) == maxInt {
		panic(fmt.Sprintf("simple: cannot allocate node: no slot"))
	}

	var id int
	if g.freeIDs.Len() != 0 && g.freeIDs.TakeMin(&id) {
		return id
	}
	if id = g.usedIDs.Max(); id < maxInt {
		return id + 1
	}
	for id = 0; id < maxInt; id++ {
		if !g.usedIDs.Has(id) {
			return id
		}
	}
	panic("unreachable")
}
443595
func (r *ReviewersRequest) GetNodeID() string {
	if r == nil || r.NodeID == nil {
		return ""
	}
	return *r.NodeID
}
347824
func (s *DeleteNodeInput) SetNodeId(v string) *DeleteNodeInput {
	s.NodeId = &v
	return s
}
1148159
func (a *DescribeNodeArgs) SetNodeID(nodeID NodeID) *DescribeNodeArgs {
	a.NodeID = &nodeID
	return a
}
960182
func (r *Reference) GetNodeID() string {
	if r == nil || r.NodeID == nil {
		return ""
	}
	return *r.NodeID
}
559381
func (s *NodeGroupConfiguration) SetNodeGroupId(v string) *NodeGroupConfiguration {
	s.NodeGroupId = &v
	return s
}
1293495
func (a *GetContentQuadsArgs) SetNodeID(nodeID NodeID) *GetContentQuadsArgs {
	a.NodeID = &nodeID
	return a
}
1327746
func NewID() string {
	b := make([]byte, 8)
	rand.Read(b)
	return fmt.Sprintf("%x", b)
}
583909
func (d *DiscussionComment) GetNodeID() string {
	if d == nil || d.NodeID == nil {
		return ""
	}
	return *d.NodeID
}
183082
func (s *ReshardingConfiguration) SetNodeGroupId(v string) *ReshardingConfiguration {
	s.NodeGroupId = &v
	return s
}
1114411
func (a *ResolveNodeArgs) SetNodeID(nodeID NodeID) *ResolveNodeArgs {
	a.NodeID = &nodeID
	return a
}
720986
func (s *TestFailoverInput) SetNodeGroupId(v string) *TestFailoverInput {
	s.NodeGroupId = &v
	return s
}
579250
func (n *Network) NewNode(name string) {
	n.mu.Lock()
	defer n.mu.Unlock()

	n.NumNodesMonitored++
	n.NumNodesMonitoredOnline++
	n.updateHealth()
}
964001
func (r *Repository) GetNodeID() string {
	if r == nil || r.NodeID == nil {
		return ""
	}
	return *r.NodeID
}
451763
func newNodeValue(value interface{}) *node {
	n := newNode()
	n.value = value
	n.children = nil
	return n
}
112820
func (t *Topology) addID(nodeID string) bool {
	t.mu.Lock()
	defer t.mu.Unlock()
	if t.containsID(nodeID) {
		return false
	}
	t.nodeIDs = append(t.nodeIDs, nodeID)

	sort.Slice(t.nodeIDs,
		func(i, j int) bool {
			return t.nodeIDs[i] < t.nodeIDs[j]
		})

	return true
}
879406
func (glpeer *GLPeer) NewNode(fn arrangerFunc) *ZNode {
	glpeer.mu.Lock()
	defer glpeer.mu.Unlock()
	n := &sprite.Node{Arranger: fn}
	glpeer.eng.Register(n)
	return &ZNode{Node: n}
}