code: def testMutableHashTable(self, is_anonymous):
      if is_anonymous and not context.executing_eagerly():
          self.skipTest(SKIP_ANONYMOUS_IN_TF1_REASON)
      save_dir = os.path.join(self.get_temp_dir(), "save_restore")
      # save_prefix = os.path.join(tempfile.mkdtemp(prefix=save_dir), "hash")
  
      v0 = variables.Variable(10.0, name="v0")
      v1 = variables.Variable(20.0, name="v1")
  
      default_val = -1
      keys = constant_op.constant(["b", "c", "d"], dtypes.string)
      values = constant_op.constant([0, 1, 2], dtypes.int64)
      table = lookup_ops.MutableHashTable(
          dtypes.string,
          dtypes.int64,
          default_val,
          name="t1",
          checkpoint=True,
          experimental_is_anonymous=is_anonymous,
      )
  
      checkpoint = checkpoint_utils.Checkpoint(
          table=table, v0=v0, v1=v1
      )
      ckpt_options = checkpoint_options.CheckpointOptions(
          experimental_enable_async_checkpoint=True
      )
      self.evaluate([v0.initializer, v1.initializer])
  
      # Check that the parameter nodes have been initialized.
      self.assertEqual(10.0, self.evaluate(v0))
      self.assertEqual(20.0, self.evaluate(v1))
  
      self.assertAllEqual(0, self.evaluate(table.size()))
      self.evaluate(table.insert(keys, values))
      self.assertAllEqual(3, self.evaluate(table.size()))
      save_path = checkpoint.save(save_dir, options=ckpt_options)
      checkpoint.sync()  # Otherwise save_path may not have finished being written
      del table, checkpoint, v0, v1
  
      v0 = variables.Variable(-1.0, name="v0")
      v1 = variables.Variable(-1.0, name="v1")
      default_val = -1
      table = lookup_ops.MutableHashTable(
          dtypes.string,
          dtypes.int64,
          default_val,
          name="t1",
          checkpoint=True,
          experimental_is_anonymous=is_anonymous,
      )
      self.evaluate(
          table.insert(
              constant_op.constant(["a", "c"], dtypes.string),
              constant_op.constant([12, 24], dtypes.int64),
          )
      )
      self.assertAllEqual(2, self.evaluate(table.size()))
  
      checkpoint = checkpoint_utils.Checkpoint(
          table=table, v0=v0, v1=v1
      )
  
      # Restore the saved values in the parameter nodes.
      checkpoint.restore(save_path).run_restore_ops()
      # Check that the parameter nodes have been restored.
      self.assertEqual(10.0, self.evaluate(v0))
      self.assertEqual(20.0, self.evaluate(v1))
  
      self.assertAllEqual(3, self.evaluate(table.size()))
  
      input_string = constant_op.constant(
          ["a", "b", "c", "d", "e"], dtypes.string
      )
      output = table.lookup(input_string)
      self.assertAllEqual([-1, 0, 1, 2, -1], self.evaluate(output))
  
file_path: tensorflow/tensorflow/python/ops/lookup_ops_async_checkpoint_test.py
imports: import os
  import tempfile
  from absl.testing import parameterized
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.checkpoint import checkpoint_options
  from tensorflow.python.eager import context
  from tensorflow.python.eager import test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.ops import variables
label_desc: Use image node_id 2 for calling the LookupOpsAsyncCheckpointTest obj's underlying member method code with example usage: obj.testMutableHashTable(is_anonymous) without return types