@record_history
def createNode(self, type, name=None):
    try:
        mobj = self._modifier.createNode(type)
    except TypeError:
        raise TypeError(("'%s' is not a valid node type" % type))
    template = self._opts['template']
    if (name or template):
        name = (template or '{name}').format(name=(name or ''), type=type, index=self._index)
        self._modifier.renameNode(mobj, name)
    node = Node(mobj, exists=False, modifier=self)
    if (not self._opts['interesting']):
        plug = node['isHistoricallyInteresting']
        _python_to_mod(False, plug, self._modifier)
    self._index += 1
    return node
@record_history
def createNode(self, type, name=None):
    try:
        mobj = self._modifier.createNode(type)
    except TypeError:
        raise TypeError(("'%s' is not a valid node type" % type))
    template = self._opts['template']
    if (name or template):
        name = (template or '{name}').format(name=(name or ), type=type, index=self._index)
        self._modifier.renameNode(mobj, name)
    node = Node(mobj, exists=False, modifier=self)
    if (not self._opts['interesting']):
        plug = node['isHistoricallyInteresting']
        _python_to_mod(False, plug, self._modifier)
    self._index += 1
    return node