code: func (c *externalMetricsClient) GetExternalMetric(metricName, namespace string, selector labels.Selector) ([]int64, time.Time, error) {
  	metrics, err := c.client.NamespacedMetrics(namespace).List(metricName, selector)
  	if err != nil {
  		return []int64{}, time.Time{}, fmt.Errorf("unable to fetch metrics from external metrics API: %v", err)
  	}
  
  	if len(metrics.Items) == 0 {
  		return nil, time.Time{}, fmt.Errorf("no metrics returned from external metrics API")
  	}
  
  	res := make([]int64, 0)
  	for _, m := range metrics.Items {
  		res = append(res, m.Value.MilliValue())
  	}
  	timestamp := metrics.Items[0].Timestamp.Time
  	return res, timestamp, nil
  }
docs: // GetExternalMetric gets all the values of a given external metric
  // that match the specified selector.