def getPort(self, port_id):
        for port in itertools.chain(self.inbound_ports, self.outbound_ports, self.bidirectional_ports):
            if port.id_ == port_id:
                return port
        # better error message
        ports = [ p.id_ for p in list(itertools.chain(self.inbound_ports, self.outbound_ports, self.bidirectional_ports)) ]
        raise error.STPUnavailableError((port_id, self.id_, str(ports)) %'No port named %s for network %s (ports: %s)')
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/topology/nml.py/Network.getPort/swapped operands of `%`