def METHOD_NAME(self, page, ctx):
    # Do some initialization
    self.ui.toolbar.clear_stacked_widget()
    # To keep backward compat, we add magicbox by default
    self.ui.toolbar.add_stacked_widget(self.ui.magicbox)
    x = self.router.dispatch(page, ctx)
    if inspect.iscoroutine(x):
        aio.create_task(x)
    self._last_page = self.current_page
    self.current_page = page