def METHOD_NAME(
    mutate: bool, cookie_session_middleware: SessionMiddleware[ClientSideSessionBackend]
) -> None:
    """Should load session cookies into session from request and overwrite the previously set cookies with the upcoming
    response.
    Session cookies from the previous session should not persist because session is mutable. Once the session is loaded
    from the cookies, those cookies are redundant. The response sets new session cookies overwriting or expiring the
    previous ones.
    """
    # Test for large session data. If it works for multiple cookies, it works for single also.
    _session = create_session(size=4096)
    @get(path="/test")
    def handler(request: Request) -> dict:
        nonlocal _session
        if mutate:
            # Modify the session, this will overwrite the previously set session cookies.
            request.session.update(create_session())
            _session = request.session
        return request.session
    ciphertext = cookie_session_middleware.backend.dump_data(_session)
    with create_test_client(
        route_handlers=[handler],
        middleware=[cookie_session_middleware.backend.config.middleware],
    ) as client:
        # Set cookies on the client to avoid warnings about per-request cookies.
        client.cookies = {  # type: ignore[assignment]
            f"{cookie_session_middleware.backend.config.key}-{i}": text.decode("utf-8")
            for i, text in enumerate(ciphertext)
        }
        response = client.get("/test")
    assert response.json() == _session
    # The session cookie names that were in the request will also be present in its response to overwrite or to expire
    # them. So, the number of cookies in the response will be at least equal to or greater than the number of cookies
    # that were in the request.
    assert response.headers["set-cookie"].count("session") >= response.request.headers["Cookie"].count("session")