code: func New(pg plugingetter.PluginGetter, netConfig *NetworkConfig) (networkallocator.NetworkAllocator, error) {
  	na := &cnmNetworkAllocator{
  		networks: make(map[string]*network),
  		services: make(map[string]struct{}),
  		tasks:    make(map[string]struct{}),
  		nodes:    make(map[string]map[string]struct{}),
  	}
  
  	// There are no driver configurations and notification
  	// functions as of now.
  	reg, err := drvregistry.New(nil, nil, nil, nil, pg)
  	if err != nil {
  		return nil, err
  	}
  
  	if err := initializeDrivers(reg); err != nil {
  		return nil, err
  	}
  
  	if err = initIPAMDrivers(reg, netConfig); err != nil {
  		return nil, err
  	}
  
  	pa, err := newPortAllocator()
  	if err != nil {
  		return nil, err
  	}
  
  	na.portAllocator = pa
  	na.drvRegistry = reg
  	return na, nil
  }
docs: // New returns a new NetworkAllocator handle