class_docstr: A buffer for storing trajectories experienced by a TRPO agent interacting
  with the environment, and using Generalized Advantage Estimation (GAE-Lambda)
  for calculating the advantages of state-action pairs.
code: def __init__(
      self, obs_dim, act_dim, size, info_shapes, gamma=0.99, lam=0.95
  ):
      self.obs_buf = np.zeros(
          core.combined_shape(size, obs_dim), dtype=np.float32
      )
      self.act_buf = np.zeros(
          core.combined_shape(size, act_dim), dtype=np.float32
      )
      self.adv_buf = np.zeros(size, dtype=np.float32)
      self.rew_buf = np.zeros(size, dtype=np.float32)
      self.ret_buf = np.zeros(size, dtype=np.float32)
      self.val_buf = np.zeros(size, dtype=np.float32)
      self.logp_buf = np.zeros(size, dtype=np.float32)
      self.info_bufs = {
          k: np.zeros([size] + list(v), dtype=np.float32)
          for k, v in info_shapes.items()
      }
      self.sorted_info_keys = core.keys_as_sorted_list(self.info_bufs)
      self.gamma, self.lam = gamma, lam
      self.ptr, self.path_start_idx, self.max_size = 0, 0, size
  
file_path: spinningup/spinup/algos/tf1/trpo/trpo.py
imports: import numpy
  import tensorflow
  import gym
  import time
  import spinup.algos.tf1.trpo.core
  from spinup.utils.logx import EpochLogger
  from spinup.utils.mpi_tf import MpiAdamOptimizer, sync_all_params
  from spinup.utils.mpi_tools import mpi_fork, mpi_avg, proc_id, mpi_statistics_scalar, num_procs
label_desc: Use image node_id 1 to create a new GAEBuffer object  with example: obj = GAEBuffer(obs_dim, act_dim, size, info_shapes, gamma, lam)