code: func (n *nodeRunner) Stop() error {
  	n.mu.Lock()
  	if n.cancelReconnect != nil { // between restarts
  		n.cancelReconnect()
  		n.cancelReconnect = nil
  	}
  	if n.swarmNode == nil {
  		// even though the swarm node is nil we still may need
  		// to send a node leave event to perform any cleanup required.
  		if n.cluster != nil {
  			n.cluster.SendClusterEvent(lncluster.EventNodeLeave)
  		}
  		n.mu.Unlock()
  		return nil
  	}
  	n.stopping = true
  	ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
  	defer cancel()
  	n.mu.Unlock()
  	if err := n.swarmNode.Stop(ctx); err != nil && !strings.Contains(err.Error(), "context canceled") {
  		return err
  	}
  	n.cluster.SendClusterEvent(lncluster.EventNodeLeave)
  	<-n.done
  	return nil
  }
docs: // Stop stops the current swarm node if it is running.