code: func (a *Allocator) parsePoolRequest(addressSpace, pool, subPool string, v6 bool) (*SubnetKey, *net.IPNet, *AddressRange, error) {
  	var (
  		nw  *net.IPNet
  		ipr *AddressRange
  		err error
  	)
  
  	if addressSpace == "" {
  		return nil, nil, nil, ipamapi.ErrInvalidAddressSpace
  	}
  
  	if pool == "" && subPool != "" {
  		return nil, nil, nil, ipamapi.ErrInvalidSubPool
  	}
  
  	if pool == "" {
  		return nil, nil, nil, nil
  	}
  
  	if _, nw, err = net.ParseCIDR(pool); err != nil {
  		return nil, nil, nil, ipamapi.ErrInvalidPool
  	}
  
  	if subPool != "" {
  		if ipr, err = getAddressRange(subPool, nw); err != nil {
  			return nil, nil, nil, err
  		}
  	}
  
  	return &SubnetKey{AddressSpace: addressSpace, Subnet: nw.String(), ChildSubnet: subPool}, nw, ipr, nil
  }
docs: // parsePoolRequest parses and validates a request to create a new pool under addressSpace and returns
  // a SubnetKey, network and range describing the request.