code: function(method, tag, root, apply, o, overrides, firstOnly) {
              tag = tag || '*';
              root = (root) ? Y.Dom.get(root) : null || document; 
  
              if (!root) {
                  return [];
              }
  
              var nodes = [],
                  elements = root.getElementsByTagName(tag);
              
              for (var i = 0, len = elements.length; i < len; ++i) {
                  if ( method(elements[i]) ) {
                      if (firstOnly) {
                          nodes = elements[i]; 
                          break;
                      } else {
                          nodes[nodes.length] = elements[i];
                      }
                  }
              }
  
              if (apply) {
                  Y.Dom.batch(nodes, apply, o, overrides);
              }
  
              YAHOO.log('getElementsBy returning ' + nodes, 'info', 'Dom');
              
              return nodes;
          }
docs: Returns an array of HTMLElements that pass the test applied by supplied boolean method.
  For optimized performance, include a tag and/or root node when possible.
  Note: This method operates against a live collection, so modifying the
  collection in the callback (removing/appending nodes, etc.) will have
  side effects.  Instead you should iterate the returned nodes array,
  as you would with the native "getElementsByTagName" method.
  @method getElementsBy
  @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
  @param {String} tag (optional) The tag name of the elements being collected
  @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point
  @param {Function} apply (optional) A function to apply to each element when found
  @param {Any} o (optional) An optional arg that is passed to the supplied method
  @param {Boolean} overrides (optional) Whether or not to override the scope of "method" with "o"
  @return {Array} Array of HTMLElements