Code flow of panel elements

I’m new to Panel and am trying to understand how code flows with panel objects. I created this following snippet but it does not behave as I would expect. What I am trying to accomplish is to pop up a message, wait 5 seconds and then close the pop up. (The real goal is to pop up a message when a function starts and then close that pop up when the function completes.) What happens when I run this snippet is that the program pauses for 5 seconds, then loads the pop up message and then nothing. The pop up never clears. The print statements were added to see how non Panel commands work and they work as expected. The Panel code does not seem to execute sequentially. Any insight would be appreciated.

import panel as pn
from panel_modal import Modal
import time


modal = Modal(pn.panel("Hi. I am the Panel Modal!", width=600))

pn.Column(modal).servable() = True
print("Modal open")
print(time.strftime("%H:%M:%S", time.localtime()))

time.sleep(5) = False
print("Modal closed")
print(time.strftime("%H:%M:%S", time.localtime()))

Perhaps asyncio.sleep(5)?