code: function (instances) {
          var r = 10000000 * Math.random(); // todo: could be replaced with algo generating keys with numbers and
          // letters
          var key = '' + (r | r); // r|r = equivalent to Math.floor - but faster in old browsers
          while (instances[key]) {
              key += 'x';
          }
          return key;
      }
docs: Generate a key that does not exist in the given object.
  @param {Object} instances Object for which a non-existent key must be generated.
  @return {String|Number} key which does not exist in instances.
  @private