code: func (cs CoordinateSet) Intersect(other CoordinateSet) (*coordinate.Coordinate, *coordinate.Coordinate) {
  	// Use the empty segment by default.
  	segment := ""
  
  	// If we have a single segment, then let our segment take priority since
  	// we are possibly a client. Any node with more than one segment can only
  	// be a server, which means it should be in all segments.
  	if len(cs) == 1 {
  		for s := range cs {
  			segment = s
  		}
  	}
  
  	// Likewise for the other set.
  	if len(other) == 1 {
  		for s := range other {
  			segment = s
  		}
  	}
  
  	return cs[segment], other[segment]
  }
docs: // Intersect tries to return a pair of coordinates which are compatible with the
  // current set and a given set. We employ some special knowledge about network
  // segments to avoid doing a full intersection, since this is in several hot
  // paths. This might return nil for either coordinate in the output pair if an
  // intersection cannot be found. The ComputeDistance function above is designed
  // to deal with that.