code: def testCheckpointable(self, rb_cls):
      self._generate_replay_buffer(rb_cls=rb_cls)
      self.assertEqual(32, self._replay_buffer.size)
  
      with self.cached_session():
          directory = self.get_temp_dir()
          prefix = os.path.join(directory, "ckpt")
          saver = tf.train.Checkpoint(rb=self._replay_buffer)
          save_path = saver.save(prefix)
  
          loaded_rb = rb_cls(
              data_spec=self._trajectory_spec, capacity=self._capacity
          )
          loader = tf.train.Checkpoint(rb=loaded_rb)
          loader.restore(save_path).initialize_or_restore()
          self.assertEqual(32, loaded_rb.size)
  
          # Check that replay buffer contains the same items as before
          ds = loaded_rb.as_dataset()
          next_trajectory = next_dataset_element(self, ds)
          min_value = self._transition_count - self._capacity
          for _ in range(200):
              traj = next_trajectory()
              self.assertLessEqual(min_value, traj.observation[0, 0, 0])
              self.assertAllEqual(
                  traj.observation[:, :, 0] + 1,
                  traj.observation[:, :, 1],
              )
              self.assertAllEqual(
                  traj.observation[:, :, 0] + 2,
                  traj.observation[:, :, 2],
              )
              self.assertAllEqual(
                  traj.observation[:, :, 0] + 3,
                  traj.observation[:, :, 3],
              )
  
imports: from __future__ import division
  from __future__ import unicode_literals
  import os
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.replay_buffers import py_hashed_replay_buffer
  from tf_agents.replay_buffers import py_uniform_replay_buffer
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 12 for calling the PyUniformReplayBufferTest obj's underlying member method code with example usage: obj.testCheckpointable(rb_cls) without return types