docs: function (args, var_args) {
      var result = {};
      if (arguments.length > 1) {
        var specs = Array.isArray(var_args) ? var_args : Array.prototype.slice.call(arguments, 1);
        var preparedSpecs, preparedArgs;
        var turningPoint;
  
        if (isRequired(specs[0]) || !(turningPoint = findTurningPoint(specs, isRequired))) {
          preparedSpecs = specs;
          preparedArgs = args;
        } else {
          var effectiveArgs = Array.isArray(args) ? args : Array.prototype.slice.call(args);
          preparedSpecs = prepare(specs, turningPoint);
          preparedArgs = prepare(effectiveArgs, effectiveArgs.length - (specs.length - turningPoint));
        }
  
        for (var specIndex = 0, argIndex = 0;
             specIndex < preparedSpecs.length && argIndex < preparedArgs.length; specIndex++) {
          var spec = preparedSpecs[specIndex], arg = preparedArgs[argIndex];
          if (isRequired(spec)) {
            result[spec] = arg;
            argIndex++;
          } else {
            var name = typeof spec === 'function' ? spec(arg) : (spec.charAt(0) !== '?' ? spec : spec.substring(1));
            if (name || arg === undefined) {
              result[name] = arg;
              argIndex++;
            }
          }
        }
      }
  
      return result;
    }