code: func (s *Server) newHealthCheckSorter(cs lib.CoordinateSet, checks structs.HealthChecks) (sort.Interface, error) {
  	state := s.fsm.State()
  	vec := make([]float64, len(checks))
  	for i, check := range checks {
  		_, other, err := state.Coordinate(check.Node, nil)
  		if err != nil {
  			return nil, err
  		}
  		c1, c2 := cs.Intersect(other)
  		vec[i] = lib.ComputeDistance(c1, c2)
  	}
  	return &healthCheckSorter{checks, vec}, nil
  }
docs: // newHealthCheckSorter returns a new sorter for the given source coordinate and
  // set of health checks with nodes.