class_docstr: The Agent class, the highest-level API that wraps together processes for action, perception, and learning under active inference.
  
  The basic usage is as follows:
  
  >>> my_agent = Agent(A = A, B = C, <more_params>)
  >>> observation = env.step(initial_action)
  >>> qs = my_agent.infer_states(observation)
  >>> q_pi, G = my_agent.infer_policies()
  >>> next_action = my_agent.sample_action()
  >>> next_observation = env.step(next_action)
  
  This represents one timestep of an active inference process. Wrapping this step in a loop with an ``Env()`` class that returns
  observations and takes actions as inputs, would entail a dynamic agent-environment interaction.
class_docstr_tok: ["The","Agent","class",",","the","highest-level","API","that","wraps","together","processes","for","action",",","perception",",","and","learning","under","active","inference",".","The","basic","usage","is","as","follows",":",">",">",">","my_agent","=","Agent","(","A","=","A",",","B","=","C",",","<","more_params",">",")",">",">",">","observation","=","env.step","(","initial_action",")",">",">",">","qs","=","my_agent.infer_states","(","observation",")",">",">",">","q_pi",",","G","=","my_agent.infer_policies","(",")",">",">",">","next_action","=","my_agent.sample_action","(",")",">",">",">","next_observation","=","env.step","(","next_action",")","This","represents","one","timestep","of","an","active","inference","process",".","Wrapping","this","step","in","a","loop","with","an","``","Env","(",")","``","class","that","returns","observations","and","takes","actions","as","inputs",",","would","entail","a","dynamic","agent-environment","interaction","."]
docstr: Returns the last ``self.policy_len`` timesteps of each policy-conditioned belief
  over hidden states. This is a step of pre-processing that needs to be done before computing
  the expected free energy of policies. We do this to avoid computing the expected free energy of 
  policies using beliefs about hidden states in the past (so-called "post-dictive" beliefs).
  
  Returns
  ---------
  future_qs_seq: ``numpy.ndarray`` of dtype object
      Posterior beliefs over hidden states under a policy, in the future. This is a nested ``numpy.ndarray`` object array, with one
      sub-array ``future_qs_seq[p_idx]`` for each policy. The indexing structure is policy->timepoint-->factor, so that 
      ``future_qs_seq[p_idx][t_idx][f_idx]`` refers to beliefs about marginal factor ``f_idx`` expected under policy ``p_idx`` 
      at future timepoint ``t_idx``, relative to the current timestep.
docstr_tok: ["Returns","the","last","``","self.policy_len","``","timesteps","of","each","policy-conditioned","belief","over","hidden","states",".","This","is","a","step","of","pre-processing","that","needs","to","be","done","before","computing","the","expected","free","energy","of","policies",".","We","do","this","to","avoid","computing","the","expected","free","energy","of","policies","using","beliefs","about","hidden","states","in","the","past","(","so-called","``","post-dictive","''","beliefs",")",".","Returns","--","--","--","--","-","future_qs_seq",":","``","numpy.ndarray","``","of","dtype","object","Posterior","beliefs","over","hidden","states","under","a","policy",",","in","the","future",".","This","is","a","nested","``","numpy.ndarray","``","object","array",",","with","one","sub-array","``","future_qs_seq","[","p_idx","]","``","for","each","policy",".","The","indexing","structure","is","policy-",">","timepoint","--",">","factor",",","so","that","``","future_qs_seq","[","p_idx","]","[","t_idx","]","[","f_idx","]","``","refers","to","beliefs","about","marginal","factor","``","f_idx","``","expected","under","policy","``","p_idx","``","at","future","timepoint","``","t_idx","``",",","relative","to","the","current","timestep","."]
code: def get_future_qs(self):
      """
      Returns the last ``self.policy_len`` timesteps of each policy-conditioned belief
      over hidden states. This is a step of pre-processing that needs to be done before computing
      the expected free energy of policies. We do this to avoid computing the expected free energy of
      policies using beliefs about hidden states in the past (so-called "post-dictive" beliefs).
  
      Returns
      ---------
      future_qs_seq: ``numpy.ndarray`` of dtype object
          Posterior beliefs over hidden states under a policy, in the future. This is a nested ``numpy.ndarray`` object array, with one
          sub-array ``future_qs_seq[p_idx]`` for each policy. The indexing structure is policy->timepoint-->factor, so that
          ``future_qs_seq[p_idx][t_idx][f_idx]`` refers to beliefs about marginal factor ``f_idx`` expected under policy ``p_idx``
          at future timepoint ``t_idx``, relative to the current timestep.
      """
  
      future_qs_seq = utils.obj_array(len(self.qs))
      for p_idx in range(len(self.qs)):
          future_qs_seq[p_idx] = self.qs[p_idx][
              -(self.policy_len + 1) :
          ]  # this grabs only the last `policy_len`+1 beliefs about hidden states, under each policy
  
      return future_qs_seq
  
imports: import warnings
  import numpy
  from pymdp import inference, control, learning
  from pymdp import utils, maths
  import copy
label_desc: Use image node_id 10 for calling the Agent obj's underlying member method code with example usage: obj.get_future_qs() and returns: future_qs_seq