function dedupePolicyPaths(packagePolicy) {
  const itemMap = /** @type {Map<string, GlobalPolicyValue>} */ (
    objToMap(packagePolicy)
  )
  reduceToTopmostApiCalls(itemMap)
  return /** @type {T} */ (mapToObj(itemMap))
}
@template {BuiltinPolicy | GlobalPolicy} T
@param {T} packagePolicy
@returns {T}