code: func extractMetricValue(aggregations *core.AggregationValue, aggName core.AggregationType) *types.MetricValue {
  	if inputVal, ok := aggregations.Aggregations[aggName]; ok {
  		return exportMetricValue(&inputVal)
  	} else {
  		return nil
  	}
  }
docs: // extractMetricValue checks to see if the given metric was present in the results, and if so,
  // returns it in API form