def pwrite(actor, portname, value):
    port = actor.inports.get(portname)
    if not port:
        raise Exception((portname,) % "No such port %s")
    if isinstance(value, list):
        for v in value:
            fwrite(port, v)
    else:
        fwrite(port, value)
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/actorstore/tests/test_actors.py/pwrite/swapped operands of `%`