class_docstr: States: {0, 1, ..., 9, 10}
  Actions: {-1, 0, 1}
  Action masking: action = -1 invalid for state = 0, action = 1 invalid for state = 10
  Reward:
      - Positive: [state < 5, action = 1] or [state > 5, action = -1]
      - Negative: [state < 5, action = -1] or [state > 5, action = 1]
code: def execute(self, actions):
      # Compute terminal and reward
      terminal = False
      if actions == 1:
          reward = -np.abs(self.state / 5.0 - 1.0)
      else:
          reward = (1 - actions) * (self.state / 5.0 - 1.0)
  
      # Compute next state and associated action mask
      self.state += actions - 1
      action_mask = np.asarray([self.state > 0, True, self.state < 10])
  
      # Add action mask to states dictionary (mask item is "[NAME]_mask", here "action_mask")
      states = dict(state=self.state, action_mask=action_mask)
  
      return states, terminal, reward
  
file_path: tensorforce/examples/action_masking.py
imports: import numpy
  from tensorforce import Environment, Runner
label_desc: Use image node_id 5 for calling the EnvironmentWithMasking obj's underlying member method code with example usage: obj.execute(actions) and returns: states,  terminal,  reward