code: func (s *DefaultStorageFactory) NewConfig(groupResource schema.GroupResource) (*storagebackend.Config, error) {
  	chosenStorageResource := s.getStorageGroupResource(groupResource)
  
  	// operate on copy
  	storageConfig := s.StorageConfig
  	codecConfig := StorageCodecConfig{
  		StorageMediaType:  s.DefaultMediaType,
  		StorageSerializer: s.DefaultSerializer,
  	}
  
  	if override, ok := s.Overrides[getAllResourcesAlias(chosenStorageResource)]; ok {
  		override.Apply(&storageConfig, &codecConfig)
  	}
  	if override, ok := s.Overrides[chosenStorageResource]; ok {
  		override.Apply(&storageConfig, &codecConfig)
  	}
  
  	var err error
  	codecConfig.StorageVersion, err = s.ResourceEncodingConfig.StorageEncodingFor(chosenStorageResource)
  	if err != nil {
  		return nil, err
  	}
  	codecConfig.MemoryVersion, err = s.ResourceEncodingConfig.InMemoryEncodingFor(groupResource)
  	if err != nil {
  		return nil, err
  	}
  	codecConfig.Config = storageConfig
  
  	storageConfig.Codec, storageConfig.EncodeVersioner, err = s.newStorageCodecFn(codecConfig)
  	if err != nil {
  		return nil, err
  	}
  	klog.V(3).Infof("storing %v in %v, reading as %v from %#v", groupResource, codecConfig.StorageVersion, codecConfig.MemoryVersion, codecConfig.Config)
  
  	return &storageConfig, nil
  }
docs: // New finds the storage destination for the given group and resource. It will
  // return an error if the group has no storage destination configured.