class_docstr: Trainer class for OpenAI Evolution Strategies.
  
  :param algorithm_config: Algorithm parameters.
  :param torch_policy: Multi-step policy encapsulating the policy networks
  :param shared_noise: The noise table, with the same content for every worker and the master.
  :param normalization_stats: Normalization statistics as calculated by the NormalizeObservationWrapper.
class_docstr_tok: ["Trainer","class","for","OpenAI","Evolution","Strategies",".",":","param","algorithm_config",":","Algorithm","parameters",".",":","param","torch_policy",":","Multi-step","policy","encapsulating","the","policy","networks",":","param","shared_noise",":","The","noise","table",",","with","the","same","content","for","every","worker","and","the","master",".",":","param","normalization_stats",":","Normalization","statistics","as","calculated","by","the","NormalizeObservationWrapper","."]
docstr: implementation of :class:`~maze.train.trainers.common.trainer.Trainer`
          
docstr_tok: ["implementation","of",":","class",":","`","~maze.train.trainers.common.trainer.Trainer","`"]
code: def state_dict(self):
      """implementation of :class:`~maze.train.trainers.common.trainer.Trainer`"""
      return self.policy.state_dict()
  
imports: import itertools
  import logging
  import time
  from typing import Optional, Iterable, Generator, Tuple, Union, Dict
  import numpy
  import torch
  from typing.io import BinaryIO
  from maze.core.agent.policy import Policy
  from maze.core.agent.torch_model import TorchModel
  from maze.core.agent.torch_policy import TorchPolicy
  from maze.core.annotations import override
  from maze.core.env.base_env_events import BaseEnvEvents
  from maze.core.log_stats.log_stats import LogStatsAggregator, LogStatsLevel, get_stats_logger, increment_log_step
  from maze.core.utils.factory import Factory
  from maze.train.trainers.common.model_selection.model_selection_base import ModelSelectionBase
  from maze.train.trainers.common.trainer import Trainer
  from maze.train.trainers.es.distributed.es_distributed_rollouts import ESDistributedRollouts, ESRolloutResult
  from maze.train.trainers.es.es_algorithm_config import ESAlgorithmConfig
  from maze.train.trainers.es.es_events import ESEvents
  from maze.train.trainers.es.es_shared_noise_table import SharedNoiseTable
  from maze.train.trainers.es.es_utils import get_flat_parameters
  from maze.train.trainers.es.optimizers.base_optimizer import Optimizer
label_desc: Use image node_id 4 for calling the ESTrainer obj's underlying member method code with example usage: obj.state_dict() and returns: self