<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close(self, cancelled=False):
 """ Close this temporary pop-up. :param cancelled: Whether the pop-up was cancelled (e.g. by pressing Esc). """

        self._on_close(cancelled)
        self._scene.remove_effect(self)