function normalizeQueryStringParameters(event) {
  if (
    !event.multiValueQueryStringParameters ||
    Object.keys(event.multiValueQueryStringParameters).length === 0
  ) {
    return event.queryStringParameters
  }
  return Object.fromEntries(
    Object.entries(event.multiValueQueryStringParameters).map(([param, value]) => {
      if (Array.isArray(value)) {
        return [param, value.join(',')]
      }
      return [param, value]
    })
  )
}
normalizes query string parameters either from multi value query string parameters or normal query string parameters to a
key map with comma separated strings

@param {object} event The event with query string to normalize
@returns {Object<string, string>} The normalized query string map