function baseInvoke(nodes, methods, args, deep) {
    methods = castArray(methods);
    nodes._tree.batch();
    nodes[deep ? 'recurseDown' : 'each'](function (node) {
      each(methods, function (method) {
        if (isFunction(node[method])) {
          node[method].apply(node, args);
        }
      });
    });
    nodes._tree.end();
    return nodes;
  }
Base function to invoke given method(s) on tree nodes.

@private
@param {TreeNode} nodes Array of node objects.
@param {string|array} methods Method names.
@param {array|Arguments} args Array of arguments to proxy.
@param {boolean} deep Invoke deeply.
@return {TreeNodes} Array of node objects.