docs: def register_states_of_state_machine(self, state_machine):
          """ This functions registers all states of state machine.
          :param state_machine: the state machine to register all states of
          :return:
          """
          root = state_machine.root_state
          root.add_observer(self, "state_execution_status",
                            notify_after_function=self.on_state_execution_status_changed_after)
          self.recursively_register_child_states(root)