code: func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion) *DefaultRESTMapper {
  	resourceToKind := make(map[schema.GroupVersionResource]schema.GroupVersionKind)
  	kindToPluralResource := make(map[schema.GroupVersionKind]schema.GroupVersionResource)
  	kindToScope := make(map[schema.GroupVersionKind]RESTScope)
  	singularToPlural := make(map[schema.GroupVersionResource]schema.GroupVersionResource)
  	pluralToSingular := make(map[schema.GroupVersionResource]schema.GroupVersionResource)
  	// TODO: verify name mappings work correctly when versions differ
  
  	return &DefaultRESTMapper{
  		resourceToKind:       resourceToKind,
  		kindToPluralResource: kindToPluralResource,
  		kindToScope:          kindToScope,
  		defaultGroupVersions: defaultGroupVersions,
  		singularToPlural:     singularToPlural,
  		pluralToSingular:     pluralToSingular,
  	}
  }
docs: // NewDefaultRESTMapper initializes a mapping between Kind and APIVersion
  // to a resource name and back based on the objects in a runtime.Scheme
  // and the Kubernetes API conventions. Takes a group name, a priority list of the versions
  // to search when an object has no default version (set empty to return an error),
  // and a function that retrieves the correct metadata for a given version.