class_docstr: Implementation of the 3-arm T-Maze environment 
class_docstr_tok: ["Implementation","of","the","3-arm","T-Maze","environment"]
code: def reset(self, state=None):
      if state is None:
          loc_state = utils.onehot(0, self.num_locations)
  
          self._reward_condition = np.random.randint(
              self.num_reward_conditions
          )  # randomly select a reward condition
          reward_condition = utils.onehot(
              self._reward_condition, self.num_reward_conditions
          )
  
          full_state = utils.obj_array(self.num_factors)
          full_state[LOCATION_FACTOR_ID] = loc_state
          full_state[TRIAL_FACTOR_ID] = reward_condition
          self._state = full_state
      else:
          self._state = state
      return self._get_observation()
  
imports: from pymdp.envs import Env
  from pymdp import utils, maths
  import numpy
label_desc: Use image node_id 2 for calling the TMazeEnv obj's underlying member method code with example usage: obj.reset(state) and returns: self