code: func applyTrinary(q *ds.Query, v logdog.QueryRequest_Trinary, f func(*ds.Query, bool) *ds.Query) *ds.Query {
  	switch v {
  	case logdog.QueryRequest_YES:
  		return f(q, true)
  
  	case logdog.QueryRequest_NO:
  		return f(q, false)
  
  	default:
  		// Default is "both".
  		return q
  	}
  }
docs: // applyTrinary executes the supplied query modification function based on a
  // trinary value.
  //
  // If the value is "YES", it will be executed with "true". If "NO", "false". If
  // "BOTH", it will not be executed.