class_docstr: 1-dimensional grid-world implementation with 3 possible movement actions ("LEFT", "STAY", "RIGHT")
code: def __init__(self, shape=[2, 2], init_state=None):
      self.shape = shape
      self.n_states = np.prod(shape)
      self.n_observations = self.n_states
      self.n_control = 3
      self.max_y = shape[0]
      self.max_x = shape[1]
      self._build()
      self.set_init_state(init_state)
      self.last_action = None
  
imports: import numpy
  import matplotlib.pyplot
  import seaborn
  from pymdp.envs import Env
label_desc: Use image node_id 1 to create a new DGridWorldEnv object from inherited base classes: object with example: obj = DGridWorldEnv(shape, init_state)