async def _monitor_process(self, pid: int):
        """Monitors a bot process and deletes the associated room when it exits."""
        proc = self.bot_procs.get(pid)
        if proc:
            await proc.wait()  # Wait for the process to exit
            room_url = self.room_mappings.pop(pid, None)

            if room_url:
                await room_pool.delete_room(room_url)
                print(f"Deleted room: {room_url}")

            del self.bot_procs[pid]
Monitors a bot process and deletes the associated room when it exits.
examples/instant-voice/server/src/server.py