code: func (s *Store) parseChecksByNodeMeta(tx *memdb.Txn, ws memdb.WatchSet,
  	idx uint64, iter memdb.ResultIterator, filters map[string]string) (uint64, structs.HealthChecks, error) {
  
  	// We don't want to track an unlimited number of nodes, so we pull a
  	// top-level watch to use as a fallback.
  	allNodes, err := tx.Get("nodes", "id")
  	if err != nil {
  		return 0, nil, fmt.Errorf("failed nodes lookup: %s", err)
  	}
  	allNodesCh := allNodes.WatchCh()
  
  	// Only take results for nodes that satisfy the node metadata filters.
  	var results structs.HealthChecks
  	for check := iter.Next(); check != nil; check = iter.Next() {
  		healthCheck := check.(*structs.HealthCheck)
  		watchCh, node, err := tx.FirstWatch("nodes", "id", healthCheck.Node)
  		if err != nil {
  			return 0, nil, fmt.Errorf("failed node lookup: %s", err)
  		}
  		if node == nil {
  			return 0, nil, ErrMissingNode
  		}
  
  		// Add even the filtered nodes so we wake up if the node metadata
  		// changes.
  		ws.AddWithLimit(watchLimit, watchCh, allNodesCh)
  		if structs.SatisfiesMetaFilters(node.(*structs.Node).Meta, filters) {
  			results = append(results, healthCheck)
  		}
  	}
  	return idx, results, nil
  }
docs: // parseChecksByNodeMeta is a helper function used to deduplicate some
  // repetitive code for returning health checks filtered by node metadata fields.