canModifyPolicy(policyChanges, hasGovernanceBypass) {
        // If an object does not have a retention policy or it is expired then all changes are allowed
        if (!this.isLocked()) {
            return true;
        }

        // The only allowed change in compliance mode is extending the retention period
        if (this.isComplianceMode()) {
            if (policyChanges.mode === 'COMPLIANCE' && this.isExtended(policyChanges.date)) {
                return true;
            }
        }

        if (this.isGovernanceMode()) {
            // Extensions are always allowed in governance mode
            if (policyChanges.mode === 'GOVERNANCE' && this.isExtended(policyChanges.date)) {
                return true;
            }

            // All other changes in governance mode require a bypass
            if (hasGovernanceBypass) {
                return true;
            }
        }

        return false;
    }
ObjectLockInfo.canModifyPolicy
@param {object} policyChanges - Proposed changes to the retention policy
@param {"GOVERNANCE" | "COMPLIANCE" | undefined} policyChanges.mode - Retention policy mode.
@param {string} policyChanges.date - Expiration date of retention policy. A string in ISO-8601 format
@param {bool} hasGovernanceBypass - Whether to bypass governance retention policies
@returns {bool} - True if the changes are allowed to be applied to the retention policy