def METHOD_NAME(self, sig_error_string):
    """
    Asserts that the logger was called when signature
    verification failed on a SafeCookieData object,
    either because of a parse error or a cryptographic
    failure.
    The sig_error_string is the expected additional
    context logged with the error.
    """
    with self.assert_logged(r'SafeCookieData signature error .*|test_session_id|.*: ' + sig_error_string):
        yield