<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def toggle(self):
 """Same as jQuery's toggle, toggles the display attribute of this element."""

        self._stable = False
        return self.show() if self.attrs["style"]["display"] == "none" else self.hide()