code: func (net *Network) ConnectNodesRing(ids []enode.ID) (err error) {
  	net.lock.Lock()
  	defer net.lock.Unlock()
  
  	if ids == nil {
  		ids = net.getUpNodeIDs()
  	}
  	l := len(ids)
  	if l < 2 {
  		return nil
  	}
  	if err := net.connectNodesChain(ids); err != nil {
  		return err
  	}
  	return net.connectNotConnected(ids[l-1], ids[0])
  }
docs: // ConnectNodesRing connects all nodes in a ring topology.
  // If ids argument is nil, all nodes that are up will be connected.