class_docstr: Memory wrapper.
code: def simulate(self, action):
      # There is subtlety here. We need to collect data
      # obs, action = policy(obs), done, reward = env(abs, action)
      # Thus we need to enqueue data before assigning new observation
  
      reward, done = self._batch_env.simulate(action)
  
      with tf.control_dependencies([reward, done]):
          enqueue_op = self.speculum.enqueue(
              [self._observ.read_value(), reward, done, action]
          )
  
      with tf.control_dependencies([enqueue_op]):
          assign = self._observ.assign(self._batch_env.observ)
  
      with tf.control_dependencies([assign]):
          return tf.identity(reward), tf.identity(done)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import os
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models.research.rl import get_policy
  from tensor2tensor.rl import ppo
  from tensor2tensor.rl.envs.tf_atari_wrappers import StackWrapper
  from tensor2tensor.rl.envs.tf_atari_wrappers import WrapperBase
  from tensor2tensor.rl.policy_learner import PolicyLearner
  from tensor2tensor.rl.restarter import Restarter
  from tensor2tensor.utils import trainer_lib
  import tensorflow.compat.v1
  import tensorflow_probability
label_desc: Use image node_id 3 for calling the _MemoryWrapper obj's underlying member method code with example usage: obj.simulate(action) and returns: tf,  tf