@record_history
def createNode(self, type, name=None, parent=None):
    parent = (parent._mobject if parent else om.MObject.kNullObj)
    try:
        mobj = self._modifier.createNode(type, parent)
    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)
    return DagNode(mobj, exists=False, modifier=self)
@record_history
def createNode(self, type, name=None, parent=None):
    parent = (parent._mobject if parent else om.MObject.kNullObj)
    try:
        mobj = self._modifier.createNode(type, parent)
    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)
    return DagNode(mobj, exists=False, modifier=self)