"""Application middleware.""" from __future__ import annotations