Returns the signing key version of the secure cookie.

        The version is returned as int.

def get_secure_cookie_key_version(
        self, name: str, value: str = None
    ) -> Optional[int]:
        """Returns the signing key version of the secure cookie.

        The version is returned as int.
        """
        self.require_setting("cookie_secret", "secure cookies")
        if value is None:
            value = self.get_cookie(name)
        if value is None:
            return None
        return get_signature_key_version(value)