<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shutdown_notebook(request, username):
 """Stop any running notebook for a user."""


    manager = get_notebook_manager(request)
    if manager.is_running(username):
        manager.stop_notebook(username)