def add_node_class(name, nodetypeid, nodecls, change = False):
    global nodeclsmap
    if nodetypeid in nodeclsmap:
        if not change:
            raise ValueError, \
                "node class already exists for nodetypeid %s" % nodetypeid
    nodeclsmap[nodetypeid] = nodecls
    if nodetypeid not in node_types:
        node_types[nodetypeid] = name
        exec (name, nodetypeid) % "%s = %s" in globals()
    elif name != node_types[nodetypeid]:
        raise ValueError, "node type already exists for '%s'" % name
    else:
        pass
dataset/ETHPy150Open coreemu/core/daemon/core/api/coreapi.py/add_node_class/swapped operands of `%`