code: func (n *Node) Leave(ctx context.Context, req *api.LeaveRequest) (*api.LeaveResponse, error) {
  	if req.Node == nil {
  		return nil, status.Errorf(codes.InvalidArgument, "no node information provided")
  	}
  
  	nodeInfo, err := ca.RemoteNode(ctx)
  	if err != nil {
  		return nil, err
  	}
  
  	ctx, cancel := n.WithContext(ctx)
  	defer cancel()
  
  	fields := logrus.Fields{
  		"node.id": nodeInfo.NodeID,
  		"method":  "(*Node).Leave",
  		"raft_id": fmt.Sprintf("%x", n.Config.ID),
  	}
  	if nodeInfo.ForwardedBy != nil {
  		fields["forwarder.id"] = nodeInfo.ForwardedBy.NodeID
  	}
  	log.G(ctx).WithFields(fields).Debug("")
  
  	if err := n.removeMember(ctx, req.Node.RaftID); err != nil {
  		return nil, err
  	}
  
  	return &api.LeaveResponse{}, nil
  }
docs: // Leave asks to a member of the raft to remove
  // us from the raft cluster. This method is called
  // from a member who is willing to leave its raft
  // membership to an active member of the raft