code: def testSaveRestore(self):
      arrays = numpy_storage.NumpyState()
      checkpoint = tf.train.Checkpoint(numpy_arrays=arrays)
      arrays.x = np.ones([3, 4])
      directory = self.get_temp_dir()
      prefix = os.path.join(directory, "ckpt")
      save_path = checkpoint.save(prefix)
      arrays.x[:] = 0.0
      self.assertAllEqual(arrays.x, np.zeros([3, 4]))
      checkpoint.restore(save_path).assert_consumed()
      self.assertAllEqual(arrays.x, np.ones([3, 4]))
  
      second_checkpoint = tf.train.Checkpoint(
          numpy_arrays=numpy_storage.NumpyState()
      )
      # Attributes of NumpyState objects are created automatically by restore()
      second_checkpoint.restore(save_path).assert_consumed()
      self.assertAllEqual(
          np.ones([3, 4]), second_checkpoint.numpy_arrays.x
      )
  
file_path: agents/tf_agents/utils/numpy_storage_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import numpy
  import tensorflow
  from tf_agents.utils import numpy_storage
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the NumpyStorageTest obj's underlying member method code with example usage: obj.testSaveRestore() without return types