code: function(name, func) {
              LGraphNode.prototype[name] = func;
              for (var i in this.registered_node_types) {
                  var type = this.registered_node_types[i];
                  if (type.prototype[name]) {
                      type.prototype["_" + name] = type.prototype[name];
                  } //keep old in case of replacing
                  type.prototype[name] = func;
              }
          }
docs: Adds this method to all nodetypes, existing and to be created
  (You can add it to LGraphNode.prototype but then existing node types wont have it)
  @method addNodeMethod
  @param {Function} func