code: def step(self, action):
      # action is 0 or 1
      if action == 0:
          if 0 < self.state:
              self.state -= 1
      elif action == 1:
          if self.state < self.chain_length - 1:
              self.state += 1
      else:
          raise ValueError(
              "An invalid action was given. The available actions are - 0 or 1, found {}".format(
                  action
              )
          )
  
      self.steps += 1
  
      return self._get_obs(), self._reward(), self._terminate(), {}
  
file_path: coach/rl_coach/environments/toy_problems/exploration_chain.py
imports: from enum import Enum
  import gym
  import numpy
  from gym import spaces
label_desc: Use image node_id 4 for calling the ExplorationChain obj's underlying member method code with example usage: obj.step(action) and returns: self,  self,  self,  dict