code: func InitNetworkPlugin(plugins []NetworkPlugin, networkPluginName string, host Host, hairpinMode kubeletconfig.HairpinMode, nonMasqueradeCIDR string, mtu int) (NetworkPlugin, error) {
  	if networkPluginName == "" {
  		// default to the no_op plugin
  		plug := &NoopNetworkPlugin{}
  		plug.Sysctl = utilsysctl.New()
  		if err := plug.Init(host, hairpinMode, nonMasqueradeCIDR, mtu); err != nil {
  			return nil, err
  		}
  		return plug, nil
  	}
  
  	pluginMap := map[string]NetworkPlugin{}
  
  	allErrs := []error{}
  	for _, plugin := range plugins {
  		name := plugin.Name()
  		if errs := validation.IsQualifiedName(name); len(errs) != 0 {
  			allErrs = append(allErrs, fmt.Errorf("network plugin has invalid name: %q: %s", name, strings.Join(errs, ";")))
  			continue
  		}
  
  		if _, found := pluginMap[name]; found {
  			allErrs = append(allErrs, fmt.Errorf("network plugin %q was registered more than once", name))
  			continue
  		}
  		pluginMap[name] = plugin
  	}
  
  	chosenPlugin := pluginMap[networkPluginName]
  	if chosenPlugin != nil {
  		err := chosenPlugin.Init(host, hairpinMode, nonMasqueradeCIDR, mtu)
  		if err != nil {
  			allErrs = append(allErrs, fmt.Errorf("Network plugin %q failed init: %v", networkPluginName, err))
  		} else {
  			klog.V(1).Infof("Loaded network plugin %q", networkPluginName)
  		}
  	} else {
  		allErrs = append(allErrs, fmt.Errorf("Network plugin %q not found.", networkPluginName))
  	}
  
  	return chosenPlugin, utilerrors.NewAggregate(allErrs)
  }
docs: // InitNetworkPlugin inits the plugin that matches networkPluginName. Plugins must have unique names.