<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_constants_updated(self):
 """Method to run when constants are changed in any way. Propagates updated constants properly. """

        # update attrs
        self.attrs["constants"] = [a.identity.encode() for a in self._constants]