def findDemarcationPort(self, port):
        # finds - if it exists - the demarcation port of a bidirectional port - have to go through unidirectional model
        assert isinstance(port, BidirectionalPort), 'Specified port for demarcation find is not bidirectional'
        if not port.hasRemote():
            return None

        try:
            remote_network_in,  remote_port_in  = self.getNetworkPort(port.outbound_port.remote_port)
            remote_network_out, remote_port_out = self.getNetworkPort(port.inbound_port.remote_port)

            if remote_network_in != remote_network_out:
                log.msg(port.id_ % 'Bidirectional port %s leads to multiple networks. Topology screwup?', system=LOG_SYSTEM)
                return None

        except error.TopologyError as e:
            log.msg('Error looking up demarcation port for %s. Message: %s' % (port.id_, str(e)), system=LOG_SYSTEM)
            return None

        remote_network = self.getNetwork(remote_network_in)

        for rp in remote_network.findPorts(True):
            if isinstance(rp, BidirectionalPort) and rp.inbound_port.id_ == remote_port_in.id_ and rp.outbound_port.id_ == remote_port_out.id_:
                return remote_network.id_, rp.id_
        return None
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/topology/nml.py/Topology.findDemarcationPort/swapped operands of `%`