code: def test_gaussian_policies(self, policy_cls):
      with TFTrainer(snapshot_config, sess=self.sess) as trainer:
          env = normalize(GymEnv("Pendulum-v0"))
  
          policy = policy_cls(name="policy", env_spec=env.spec)
  
          baseline = LinearFeatureBaseline(env_spec=env.spec)
  
          sampler = LocalSampler(
              agents=policy,
              envs=env,
              max_episode_length=env.spec.max_episode_length,
              is_tf_worker=True,
          )
  
          algo = TRPO(
              env_spec=env.spec,
              policy=policy,
              baseline=baseline,
              sampler=sampler,
              discount=0.99,
              max_kl_step=0.01,
              optimizer=ConjugateGradientOptimizer,
              optimizer_args=dict(
                  hvp_approach=FiniteDifferenceHVP(base_eps=1e-5)
              ),
          )
  
          trainer.setup(algo, env)
          trainer.train(n_epochs=1, batch_size=4000)
          env.close()
  
file_path: garage/tests/garage/tf/policies/test_gaussian_policies.py
imports: import pytest
  from garage.envs import GymEnv, normalize
  from garage.np.baselines import LinearFeatureBaseline
  from garage.sampler import LocalSampler
  from garage.tf.algos import TRPO
  from garage.tf.optimizers import ConjugateGradientOptimizer, FiniteDifferenceHVP
  from garage.tf.policies import GaussianGRUPolicy, GaussianLSTMPolicy, GaussianMLPPolicy
  from garage.trainer import TFTrainer
  from tests.fixtures import snapshot_config, TfGraphTestCase
label_desc: Use image node_id 1 for calling the TestGaussianPolicies obj's underlying member method code with example usage: obj.test_gaussian_policies(policy_cls) without return types