input: Write a python function to execute a SMACH state machine and return the final outcome.
  assert execute_state_machine() == 'final_outcome'
output: def execute_state_machine():
      import smach
  
      # Define a simple state
      class SimpleState(smach.State):
          def __init__(self):
              smach.State.__init__(self, outcomes=['outcome1', 'outcome2'])
  
          def execute(self, userdata):
              return 'outcome1'
  
      # Create a SMACH state machine
      sm = smach.StateMachine(outcomes=['final_outcome'])
  
      # Open the state machine
      with sm:
          # Add states to the container
          smach.StateMachine.add('SIMPLE_STATE', SimpleState(), transitions={'outcome1': 'final_outcome', 'outcome2': 'SIMPLE_STATE'})
  
      # Execute SMACH plan
      outcome = sm.execute()
      return outcome