async def shutdown_event():
    """
    Clean up all server instances when the application shuts down.
    """
    await cleanup_all_servers()

    Clean up all server instances when the application shuts down.
    
src/upsonic/tools_server/server/api.py