code: func SetKubernetesDefaults(config *Config) error {
  	if config.Prefix == "" {
  		config.Prefix = "/api"
  	}
  	if len(config.UserAgent) == 0 {
  		config.UserAgent = DefaultKubernetesUserAgent()
  	}
  	g, err := latest.Group(api.GroupName)
  	if err != nil {
  		return err
  	}
  	// TODO: Unconditionally set the config.Version, until we fix the config.
  	copyGroupVersion := g.GroupVersion
  	config.GroupVersion = &copyGroupVersion
  	versionInterfaces, err := g.InterfacesFor(*config.GroupVersion)
  	if err != nil {
  		return fmt.Errorf("API version '%v' is not recognized (valid values: %v)", *config.GroupVersion, latest.GroupOrDie(api.GroupName).GroupVersions)
  	}
  	if config.Codec == nil {
  		config.Codec = versionInterfaces.Codec
  	}
  	if config.QPS == 0.0 {
  		config.QPS = 5.0
  	}
  	if config.Burst == 0 {
  		config.Burst = 10
  	}
  	return nil
  }
docs: // SetKubernetesDefaults sets default values on the provided client config for accessing the
  // Kubernetes API or returns an error if any of the defaults are impossible or invalid.
  // TODO: this method needs to be split into one that sets defaults per group, expected to be fix in PR "Refactoring clientcache.go and helper.go #14592"