jsonStringifySortedPolicy(policy) {
    const result = jsonStringify(policy, {
      space: 2,
      cmp: diffFriendlyPolicyKeysComparator,
    })
    if (result === undefined) {
      throw new TypeError('Failed to stringify policy')
    }
    return result
  }
Stringifies a policy, sorting the keys in a diff-friendly way.

@param {LavaMoatPolicy | LavaMoatPolicyOverrides | LavaMoatPolicyDebug} policy
@returns {string}