code: func (m *Memberlist) mergeRemoteState(join bool, remoteNodes []pushNodeState, userBuf []byte) error {
  	if err := m.verifyProtocol(remoteNodes); err != nil {
  		return err
  	}
  
  	// Invoke the merge delegate if any
  	if join && m.config.Merge != nil {
  		nodes := make([]*Node, len(remoteNodes))
  		for idx, n := range remoteNodes {
  			nodes[idx] = &Node{
  				Name: n.Name,
  				Addr: n.Addr,
  				Port: n.Port,
  				Meta: n.Meta,
  				PMin: n.Vsn[0],
  				PMax: n.Vsn[1],
  				PCur: n.Vsn[2],
  				DMin: n.Vsn[3],
  				DMax: n.Vsn[4],
  				DCur: n.Vsn[5],
  			}
  		}
  		if err := m.config.Merge.NotifyMerge(nodes); err != nil {
  			return err
  		}
  	}
  
  	// Merge the membership state
  	m.mergeState(remoteNodes)
  
  	// Invoke the delegate for user state
  	if userBuf != nil && m.config.Delegate != nil {
  		m.config.Delegate.MergeRemoteState(userBuf, join)
  	}
  	return nil
  }
docs: // mergeRemoteState is used to merge the remote state with our local state