code: func (c *MetricConverter) ConvertResultToVersion(res rest.Result, gv schema.GroupVersion) (runtime.Object, error) {
  	if err := res.Error(); err != nil {
  		return nil, err
  	}
  
  	metricBytes, err := res.Raw()
  	if err != nil {
  		return nil, err
  	}
  
  	decoder := c.codecs.UniversalDecoder(MetricVersions...)
  	rawMetricObj, err := runtime.Decode(decoder, metricBytes)
  	if err != nil {
  		return nil, err
  	}
  
  	metricObj, err := c.UnsafeConvertToVersionVia(rawMetricObj, gv)
  	if err != nil {
  		return nil, err
  	}
  	return metricObj, nil
  }
docs: // ConvertResultToVersion converts a Result to the provided GroupVersion