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

        # update attrs
        self.attrs["axes"] = [a.identity.encode() for a in self._axes]
        # remove old attributes
        while len(self._current_axis_identities_in_natural_namespace) > 0:
            key = self._current_axis_identities_in_natural_namespace.pop(0)
            try:
                delattr(self, key)
            except AttributeError:
                pass  # already gone
        # populate new attributes
        for a in self._axes:
            key = a.natural_name
            setattr(self, key, a)
            self._current_axis_identities_in_natural_namespace.append(key)