<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_stop_scene(self, event: events.StopScene, signal: Callable[[Any], None]):
 """ Stop a running scene. If there's a scene on the stack, it resumes. """

        self.stop_scene()
        if self.current_scene is not None:
            signal(events.SceneContinued())
        else:
            signal(events.Quit())