class_docstr: Trust Region Policy Optimization (https://arxiv.org/abs/1502.05477)
  
  :param policy: (ActorCriticPolicy or str) The policy model to use (MlpPolicy, CnnPolicy, CnnLstmPolicy, ...)
  :param env: (Gym environment or str) The environment to learn from (if registered in Gym, can be str)
  :param gamma: (float) the discount value
  :param timesteps_per_batch: (int) the number of timesteps to run per batch (horizon)
  :param max_kl: (float) the Kullback-Leibler loss threshold
  :param cg_iters: (int) the number of iterations for the conjugate gradient calculation
  :param lam: (float) GAE factor
  :param entcoeff: (float) the weight for the entropy loss
  :param cg_damping: (float) the compute gradient dampening factor
  :param vf_stepsize: (float) the value function stepsize
  :param vf_iters: (int) the value function's number iterations for learning
  :param verbose: (int) the verbosity level: 0 none, 1 training information, 2 tensorflow debug
  :param tensorboard_log: (str) the log location for tensorboard (if None, no logging)
  :param _init_setup_model: (bool) Whether or not to build the network at the creation of the instance
  :param policy_kwargs: (dict) additional arguments to be passed to the policy on creation
  :param full_tensorboard_log: (bool) enable additional logging when using tensorboard
      WARNING: this logging can take a lot of space quickly
  :param seed: (int) Seed for the pseudo-random generators (python, numpy, tensorflow).
      If None (default), use random seed. Note that if you want completely deterministic
      results, you must set `n_cpu_tf_sess` to 1.
  :param n_cpu_tf_sess: (int) The number of threads for TensorFlow operations
      If None, the number of cpu of the current machine will be used.
code: def __init__(
      self,
      policy,
      env,
      gamma=0.99,
      timesteps_per_batch=1024,
      max_kl=0.01,
      cg_iters=10,
      lam=0.98,
      entcoeff=0.0,
      cg_damping=1e-2,
      vf_stepsize=3e-4,
      vf_iters=3,
      verbose=0,
      tensorboard_log=None,
      _init_setup_model=True,
      policy_kwargs=None,
      full_tensorboard_log=False,
      seed=None,
      n_cpu_tf_sess=1,
  ):
      super(TRPO, self).__init__(
          policy=policy,
          env=env,
          verbose=verbose,
          requires_vec_env=False,
          _init_setup_model=_init_setup_model,
          policy_kwargs=policy_kwargs,
          seed=seed,
          n_cpu_tf_sess=n_cpu_tf_sess,
      )
  
      self.using_gail = False
      self.timesteps_per_batch = timesteps_per_batch
      self.cg_iters = cg_iters
      self.cg_damping = cg_damping
      self.gamma = gamma
      self.lam = lam
      self.max_kl = max_kl
      self.vf_iters = vf_iters
      self.vf_stepsize = vf_stepsize
      self.entcoeff = entcoeff
      self.tensorboard_log = tensorboard_log
      self.full_tensorboard_log = full_tensorboard_log
  
      # GAIL Params
      self.hidden_size_adversary = 100
      self.adversary_entcoeff = 1e-3
      self.expert_dataset = None
      self.g_step = 1
      self.d_step = 1
      self.d_stepsize = 3e-4
  
      self.graph = None
      self.sess = None
      self.policy_pi = None
      self.loss_names = None
      self.assign_old_eq_new = None
      self.compute_losses = None
      self.compute_lossandgrad = None
      self.compute_fvp = None
      self.compute_vflossandgrad = None
      self.d_adam = None
      self.vfadam = None
      self.get_flat = None
      self.set_from_flat = None
      self.timed = None
      self.allmean = None
      self.nworkers = None
      self.rank = None
      self.reward_giver = None
      self.step = None
      self.proba_step = None
      self.initial_state = None
      self.params = None
      self.summary = None
  
      if _init_setup_model:
          self.setup_model()
  
imports: import time
  from contextlib import contextmanager
  from collections import deque
  import gym
  from mpi4py import MPI
  import tensorflow
  import numpy
  import stable_baselines.common.tf_util
  from stable_baselines.common.tf_util import total_episode_reward_logger
  from stable_baselines.common import explained_variance, zipsame, dataset, fmt_row, colorize, ActorCriticRLModel, SetVerbosity, TensorboardWriter
  from stable_baselines import logger
  from stable_baselines.common.mpi_adam import MpiAdam
  from stable_baselines.common.cg import conjugate_gradient
  from stable_baselines.common.policies import ActorCriticPolicy
  from stable_baselines.common.misc_util import flatten_lists
  from stable_baselines.common.runners import traj_segment_generator
  from stable_baselines.trpo_mpi.utils import add_vtarg_and_adv
label_desc: Use image node_id 1 to create a new TRPO object from inherited base classes: ActorCriticRLModel with example: obj = TRPO(policy, env, gamma, timesteps_per_batch, max_kl, cg_iters, lam, entcoeff, cg_damping, vf_stepsize, vf_iters, verbose, tensorboard_log, _init_setup_model, policy_kwargs, full_tensorboard_log, seed, n_cpu_tf_sess)