def seedNAT(self, (host, port), sourcePort=0, conditional=True):
        if sourcePort not in self._ports:
            if sourcePort != 0:
                if conditional:
                    return None
                else:
                    raise AssertionError('tried to seed %r in %r %r %r' %
                                         (sourcePort, self, self._ports, self.factory.service))
            sourcePort = self.bindNewPort(sourcePort)
        else:
            assert sourcePort != 0
        p, proto = self._ports[sourcePort]
        p.write('NAT!', (host, port))
        return sourcePort
dataset/ETHPy150Open twisted/vertex/vertex/q2q.py/PTCPConnectionDispatcher.seedNAT/original