code: func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string, isInternal bool) error {
  	hostUpdates := make([]func() error, 0, len(nodes))
  	for _, node := range nodes {
  		localNodeName := node.Name
  		if as.useStandardLoadBalancer() && as.excludeMasterNodesFromStandardLB() && isMasterNode(node) {
  			klog.V(4).Infof("Excluding master node %q from load balancer backendpool %q", localNodeName, backendPoolID)
  			continue
  		}
  
  		if as.ShouldNodeExcludedFromLoadBalancer(node) {
  			klog.V(4).Infof("Excluding unmanaged/external-resource-group node %q", localNodeName)
  			continue
  		}
  
  		f := func() error {
  			err := as.EnsureHostInPool(service, types.NodeName(localNodeName), backendPoolID, vmSetName, isInternal)
  			if err != nil {
  				return fmt.Errorf("ensure(%s): backendPoolID(%s) - failed to ensure host in pool: %q", getServiceName(service), backendPoolID, err)
  			}
  			return nil
  		}
  		hostUpdates = append(hostUpdates, f)
  	}
  
  	errs := utilerrors.AggregateGoroutines(hostUpdates...)
  	if errs != nil {
  		return utilerrors.Flatten(errs)
  	}
  
  	return nil
  }
docs: // EnsureHostsInPool ensures the given Node's primary IP configurations are
  // participating in the specified LoadBalancer Backend Pool.