code: func (c *multiClient) getPreferredClient() (CustomMetricsClient, error) {
  	pref, err := c.availableAPIs.PreferredVersion()
  	if err != nil {
  		return nil, err
  	}
  
  	c.mu.RLock()
  	client, present := c.clients[pref]
  	c.mu.RUnlock()
  	if present {
  		return client, nil
  	}
  
  	c.mu.Lock()
  	defer c.mu.Unlock()
  	client, err = c.newClient(pref)
  	if err != nil {
  		return nil, err
  	}
  	c.clients[pref] = client
  
  	return client, nil
  }
docs: // getPreferredClient returns a custom metrics client of the preferred api version.