code: func generateInstanceMetric(vals map[string]interface{}, name string, instances []string, t MetricType, s MetricSemantics, u MetricUnit, desc ...string) (*pcpInstanceMetric, error) {
  	indomname := name + ".indom"
  	indom, err := NewPCPInstanceDomain(indomname, instances)
  	if err != nil {
  		return nil, errors.Errorf("cannot create indom, error: %v", err)
  	}
  
  	d, err := newpcpMetricDesc(name, t, s, u, desc...)
  	if err != nil {
  		return nil, err
  	}
  
  	return newpcpInstanceMetric(vals, indom, d)
  }
docs: ///////////////////////////////////////////////////////////////////////////////