docs: def get_state_machine(self):
          """Get a reference of the state_machine the state belongs to
  
          :rtype rafcon.core.state_machine.StateMachine
          :return: respective state machine
          """
          if self.parent:
              if self.is_root_state:
                  return self.parent
              else:
                  return self.parent.get_state_machine()
  
          return None