code: func (c *CNIConfig) ValidateNetworkList(ctx context.Context, list *NetworkConfigList) ([]string, error) {
  	version := list.CNIVersion
  
  	// holding map for seen caps (in case of duplicates)
  	caps := map[string]interface{}{}
  
  	errs := []error{}
  	for _, net := range list.Plugins {
  		if err := c.validatePlugin(ctx, net.Network.Type, version); err != nil {
  			errs = append(errs, err)
  		}
  		for c, enabled := range net.Network.Capabilities {
  			if !enabled {
  				continue
  			}
  			caps[c] = struct{}{}
  		}
  	}
  
  	if len(errs) > 0 {
  		return nil, fmt.Errorf("%v", errs)
  	}
  
  	// make caps list
  	cc := make([]string, 0, len(caps))
  	for c := range caps {
  		cc = append(cc, c)
  	}
  
  	return cc, nil
  }
docs: // ValidateNetworkList checks that a configuration is reasonably valid.
  // - all the specified plugins exist on disk
  // - every plugin supports the desired version.
  //
  // Returns a list of all capabilities supported by the configuration, or error