<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_rulebook(self, *args):
 """Make sure to update when the rulebook changes"""

        if self.rulebook is None:
            return
        self.rulebook.connect(self._trigger_redata, weak=False)
        self.redata()