class_docstr: Implementation of the 3-arm T-Maze environment 
class_docstr_tok: ["Implementation","of","the","3-arm","T-Maze","environment"]
code: def _construct_likelihood_dist(self):
      A = utils.obj_array_zeros(
          [[obs_dim] + self.num_states for obs_dim in self.num_obs]
      )
  
      for loc in range(self.num_states[LOCATION_FACTOR_ID]):
          for reward_condition in range(
              self.num_states[TRIAL_FACTOR_ID]
          ):
              # The case when the agent is in the centre location
              if loc == 0:
                  # When in the centre location, reward observation is always 'no reward'
                  # or the outcome with index 0
                  A[REWARD_MODALITY_ID][0, loc, reward_condition] = 1.0
  
                  # When in the centre location, cue is totally ambiguous with respect to the reward condition
                  A[CUE_MODALITY_ID][:, loc, reward_condition] = (
                      1.0 / self.num_obs[2]
                  )
  
              # The case when loc == 3, or the cue location ('bottom arm')
              elif loc == 3:
                  # When in the cue location, reward observation is always 'no reward'
                  # or the outcome with index 0
                  A[REWARD_MODALITY_ID][0, loc, reward_condition] = 1.0
  
                  # When in the cue location, the cue indicates the reward condition umambiguously
                  # signals where the reward is located
                  A[CUE_MODALITY_ID][
                      reward_condition, loc, reward_condition
                  ] = 1.0
  
              # The case when the agent is in one of the (potentially-) rewarding armS
              else:
                  # When location is consistent with reward condition
                  if loc == (reward_condition + 1):
                      # Means highest probability is concentrated over reward outcome
                      high_prob_idx = REWARD_IDX
                      # Lower probability on loss outcome
                      low_prob_idx = LOSS_IDX
                  else:
                      # Means highest probability is concentrated over loss outcome
                      high_prob_idx = LOSS_IDX
                      # Lower probability on reward outcome
                      low_prob_idx = REWARD_IDX
  
                  reward_probs = self.reward_probs[0]
                  A[REWARD_MODALITY_ID][
                      high_prob_idx, loc, reward_condition
                  ] = reward_probs
  
                  reward_probs = self.reward_probs[1]
                  A[REWARD_MODALITY_ID][
                      low_prob_idx, loc, reward_condition
                  ] = reward_probs
  
                  # Cue is ambiguous when in the reward location
                  A[CUE_MODALITY_ID][:, loc, reward_condition] = (
                      1.0 / self.num_obs[2]
                  )
  
              # The agent always observes its location, regardless of the reward condition
              A[LOCATION_MODALITY_ID][loc, loc, reward_condition] = 1.0
  
      return A
  
imports: from pymdp.envs import Env
  from pymdp import utils, maths
  import numpy
label_desc: Use image node_id 12 for calling the TMazeEnv obj's underlying member method code with example usage: obj._construct_likelihood_dist() and returns: A