def apply(self):
        if self._capacity is not None and len(self._pool) == self._capacity:
            return
        addr = self._next_host()
        if addr is None:
            self.reset()
            addr = self._next_host()
        if addr is None:
            if self._capacity is None:
                self._capacity = len(self._pool)
        else:
            self._pool.append(addr)
        return addr
Return a available IP address and register it.
dataset/ETHPy150Open sorz/sstp-server/sstpd/address.py/IPPool.apply