code: func EnableVersions(versions ...unversioned.GroupVersion) error {
  	var unregisteredVersions []unversioned.GroupVersion
  	for _, v := range versions {
  		if _, found := registeredVersions[v]; !found {
  			unregisteredVersions = append(unregisteredVersions, v)
  		}
  		enabledVersions[v] = struct{}{}
  	}
  	if len(unregisteredVersions) != 0 {
  		return fmt.Errorf("Please register versions before enabling them: %v", unregisteredVersions)
  	}
  	return nil
  }
docs: // EnableVersions adds the versions for the given group to the list of enabled versions.
  // Note that the caller should call RegisterGroup before calling this method.
  // The caller of this function is responsible to add the versions to scheme and RESTMapper.