code: func GetResourceKind(groupVersion schema.GroupVersion, storage rest.Storage, typer runtime.ObjectTyper) (schema.GroupVersionKind, error) {
  	// Let the storage tell us exactly what GVK it has
  	if gvkProvider, ok := storage.(rest.GroupVersionKindProvider); ok {
  		return gvkProvider.GroupVersionKind(groupVersion), nil
  	}
  
  	object := storage.New()
  	fqKinds, _, err := typer.ObjectKinds(object)
  	if err != nil {
  		return schema.GroupVersionKind{}, err
  	}
  
  	// a given go type can have multiple potential fully qualified kinds.  Find the one that corresponds with the group
  	// we're trying to register here
  	fqKindToRegister := schema.GroupVersionKind{}
  	for _, fqKind := range fqKinds {
  		if fqKind.Group == groupVersion.Group {
  			fqKindToRegister = groupVersion.WithKind(fqKind.Kind)
  			break
  		}
  	}
  	if fqKindToRegister.Empty() {
  		return schema.GroupVersionKind{}, fmt.Errorf("unable to locate fully qualified kind for %v: found %v when registering for %v", reflect.TypeOf(object), fqKinds, groupVersion)
  	}
  
  	// group is guaranteed to match based on the check above
  	return fqKindToRegister, nil
  }
docs: // GetResourceKind returns the external group version kind registered for the given storage
  // object. If the storage object is a subresource and has an override supplied for it, it returns
  // the group version kind supplied in the override.