code: func withRetries(maxRetries int, f func() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)) ([]*metav1.APIGroup, []*metav1.APIResourceList, error) {
  	var result []*metav1.APIResourceList
  	var resultGroups []*metav1.APIGroup
  	var err error
  	for i := 0; i < maxRetries; i++ {
  		resultGroups, result, err = f()
  		if err == nil {
  			return resultGroups, result, nil
  		}
  		if _, ok := err.(*ErrGroupDiscoveryFailed); !ok {
  			return nil, nil, err
  		}
  	}
  	return resultGroups, result, err
  }
docs: // withRetries retries the given recovery function in case the groups supported by the server change after ServerGroup() returns.