code: function make_reducer_agg(target_field, reducer, arg) {
      if (! _.has(REDUCERS_TO_ES_AGGRS, reducer)) {
          return null;
      }
      var aggr_name = REDUCERS_TO_ES_AGGRS[reducer];
  
      var aggr = {};
      aggr[aggr_name] = { field: arg };
  
      return [ target_field, aggr ];
  }
docs: take a juttle reducer expression (such as x=max("value") ) and build an elasticsearch aggregation for it. target_field is the LHS (x in the above example) reducer is the name of the reducer (max in the above example) arg is the argument to the reducer (value in the above example)