export const groupBy = (arr, attr, keyRenamer) =>
// Ignored via go/ees005
// eslint-disable-next-line @typescript-eslint/no-explicit-any
arr.reduce((acc, item) => {
  acc[keyRenamer(item[attr])] = item;
  return acc;
}, {});