def METHOD_NAME(max_age: int, should_raise: bool) -> None:
    if should_raise:
        with pytest.raises(ImproperlyConfiguredException):
            CookieBackendConfig(secret=os.urandom(16), key="a", max_age=max_age)
    else:
        CookieBackendConfig(secret=os.urandom(16), key="a", max_age=max_age)