def allocate_port_range(n)
      if n <= @free_ports.length
        ps = @free_ports.take(n)
        @free_ports = @free_ports.drop(n)
        @allocated_ports.concat(ps)
        PortAllocator.new(ports: ps)
      else
        raise NoPortsAvailable
      end
    end
def allocate_port_range(n)
      if n <= @free_ports.length
        ps = @free_ports.take(n)
        @free_ports = @free_ports.drop(n)
        @allocated_ports.concat(ps)
        PortAllocator.new(ports: ps)
      else
        raise NoPortsAvailable
      end
    end
Create a new Hive::PortAllocator instance with a number of ports from
 the range