code: func (s *NodeService) ToServiceNode(node string) *ServiceNode {
  	theWeights := Weights{
  		Passing: 1,
  		Warning: 1,
  	}
  	if s.Weights != nil {
  		if err := ValidateWeights(s.Weights); err == nil {
  			theWeights = *s.Weights
  		}
  	}
  	// DEPRECATED (ProxyDestination) - remove this when removing ProxyDestination
  	legacyProxyDest := s.Proxy.DestinationServiceName
  	if legacyProxyDest == "" {
  		legacyProxyDest = s.ProxyDestination
  	}
  	return &ServiceNode{
  		// Skip ID, see ServiceNode definition.
  		Node: node,
  		// Skip Address, see ServiceNode definition.
  		// Skip TaggedAddresses, see ServiceNode definition.
  		ServiceKind:              s.Kind,
  		ServiceID:                s.ID,
  		ServiceName:              s.Service,
  		ServiceTags:              s.Tags,
  		ServiceAddress:           s.Address,
  		ServicePort:              s.Port,
  		ServiceMeta:              s.Meta,
  		ServiceWeights:           theWeights,
  		ServiceEnableTagOverride: s.EnableTagOverride,
  		ServiceProxy:             s.Proxy,
  		ServiceProxyDestination:  legacyProxyDest,
  		ServiceConnect:           s.Connect,
  		RaftIndex: RaftIndex{
  			CreateIndex: s.CreateIndex,
  			ModifyIndex: s.ModifyIndex,
  		},
  	}
  }
docs: // ToServiceNode converts the given node service to a service node.