code: func NewForConfig(cfg *restclient.Config, mapper PreferredResourceMapper, resolver dynamic.APIPathResolverFunc, scaleKindResolver ScaleKindResolver) (ScalesGetter, error) {
  	// so that the RESTClientFor doesn't complain
  	cfg.GroupVersion = &schema.GroupVersion{}
  
  	cfg.NegotiatedSerializer = codecs.WithoutConversion()
  	if len(cfg.UserAgent) == 0 {
  		cfg.UserAgent = restclient.DefaultKubernetesUserAgent()
  	}
  
  	client, err := restclient.RESTClientFor(cfg)
  	if err != nil {
  		return nil, err
  	}
  
  	return New(client, mapper, resolver, scaleKindResolver), nil
  }
docs: // NewForConfig creates a new ScalesGetter which resolves kinds
  // to resources using the given RESTMapper, and API paths using
  // the given dynamic.APIPathResolverFunc.