class_docstr: Simple Cross Entropy Method.
  
  Args:
      env_spec (EnvSpec): Environment specification.
      policy (Policy): Action policy.
      sampler (garage.sampler.Sampler): Sampler.
docstr: Get samples and train the policy.
  
  Args:
      trainer (Trainer): Trainer.
docstr_tok: ["Get","samples","and","train","the","policy",".","Args",":","trainer","(","Trainer",")",":","Trainer","."]
code: def train(self, trainer):
      """Get samples and train the policy.
  
      Args:
          trainer (Trainer): Trainer.
  
      """
      for epoch in trainer.step_epochs():
          samples = trainer.obtain_samples(epoch)
          log_performance(
              epoch,
              EpisodeBatch.from_list(self.env_spec, samples),
              self._discount,
          )
          self._train_once(epoch, samples)
  
file_path: garage/src/garage/examples/np/tutorial_cem.py
imports: import numpy
  from garage import EpisodeBatch, log_performance, wrap_experiment
  from garage.envs import GymEnv
  from garage.experiment.deterministic import set_seed
  from garage.np import discount_cumsum
  from garage.sampler import LocalSampler
  from garage.tf.policies import CategoricalMLPPolicy
  from garage.trainer import TFTrainer
label_desc: Use image node_id 2 for calling the SimpleCEM obj's underlying member method code with example usage: obj.train(trainer) without return types