# the naming conflict with the built-in one affects
        # only the internals of this method
        next: Callable[[], Awaitable[BoltResponse]],
    ) -&gt; Optional[BoltResponse]:
        &#34;&#34;&#34;Processes a request data before other middleware and listeners.
        A middleware calls `next()` function if the chain should continue.

            @app.middleware
            async def simple_middleware(req, resp, next):
                # do something here
                await next()

        This