code: func makeAPIServiceAvailableHealthzCheck(name string, apiServices []*apiregistration.APIService, apiServiceInformer informers.APIServiceInformer) healthz.HealthzChecker {
  	// Track the auto-registered API services that have not been observed to be available yet
  	pendingServiceNamesLock := &sync.RWMutex{}
  	pendingServiceNames := sets.NewString()
  	for _, service := range apiServices {
  		pendingServiceNames.Insert(service.Name)
  	}
  
  	// When an APIService in the list is seen as available, remove it from the pending list
  	handleAPIServiceChange := func(service *apiregistration.APIService) {
  		pendingServiceNamesLock.Lock()
  		defer pendingServiceNamesLock.Unlock()
  		if !pendingServiceNames.Has(service.Name) {
  			return
  		}
  		if apiregistration.IsAPIServiceConditionTrue(service, apiregistration.Available) {
  			pendingServiceNames.Delete(service.Name)
  		}
  	}
  
  	// Watch add/update events for APIServices
  	apiServiceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
  		AddFunc:    func(obj interface{}) { handleAPIServiceChange(obj.(*apiregistration.APIService)) },
  		UpdateFunc: func(old, new interface{}) { handleAPIServiceChange(new.(*apiregistration.APIService)) },
  	})
  
  	// Don't return healthy until the pending list is empty
  	return healthz.NamedCheck(name, func(r *http.Request) error {
  		pendingServiceNamesLock.RLock()
  		defer pendingServiceNamesLock.RUnlock()
  		if pendingServiceNames.Len() > 0 {
  			return fmt.Errorf("missing APIService: %v", pendingServiceNames.List())
  		}
  		return nil
  	})
  }
docs: // makeAPIServiceAvailableHealthzCheck returns a healthz check that returns healthy
  // once all of the specified services have been observed to be available at least once.