function pick(object, keys) {
  const entries = keys.map((key) => [key, object[key]]);
  return Object.fromEntries(entries);
}
@template Obj
@template {keyof Obj} Keys
@param {Obj} object
@param {Array<Keys>} keys
@returns {{[key in Keys]: Obj[key]}}