code: function(aData, index) {
          var Rec   = widget.Record,
              a     = lang.isArray(aData) ? aData : [aData],
              added = [],
              i = 0, l = a.length, j = 0;
  
          index = parseInt(index,10)|0;
  
          for(; i < l; ++i) {
              if (typeof a[i] === 'object' && a[i]) {
                  added[j++] = this._records[index + i] = new Rec(a[i]);
              }
          }
  
          this.fireEvent("recordsSetEvent",{records:added,data:aData});
          // Backward compatibility for bug 1918245
          this.fireEvent("recordsSet",{records:added,data:aData});
          YAHOO.log("Set "+j+" Record(s) at index "+index, "info",
                    this.toString());
  
          if (a.length && !added.length) {
              YAHOO.log("Could not set Records with data " +
                      lang.dump(aData), "info", this.toString());
          }
  
          return added.length > 1 ? added : added[0];
      }
docs: Sets or replaces multiple Records at once to the RecordSet with the given
  data, starting at the given index. If index is not specified, then the new
  Records are added to the end of the RecordSet.
  
  @method setRecords
  @param aData {Object[]} An array of object literal data.
  @param index {Number} (optional) Position index.
  @return {YAHOO.widget.Record[]} An array of Record instances.