function padArgs(args, count, value) {
  let padded = args.slice(0);
  for (let i = args.length; i < count; i++) {
    padded.push(value);
  }
  return padded;
}
@param {any[]} args
@param {number} count
@param {any} value