code: def testRestoreOrInitialize(self):
      directory = self.get_temp_dir()
  
      # Create a checkpoint for initializing.
      init_prefix = os.path.join(directory, "init")
      init_v = variables.Variable(2.0)
      init_ckpt = util.Checkpoint(v=init_v)
      self.evaluate(init_v.initializer)
      init_path = init_ckpt.save(init_prefix)
  
      # Create the checkpoint manager.
      ckpt_dir = os.path.join(directory, "ckpt")
      v = variables.Variable(1.0)
      checkpoint = util.Checkpoint(v=v)
      manager = checkpoint_management.CheckpointManager(
          checkpoint,
          ckpt_dir,
          max_to_keep=None,
          init_fn=lambda: checkpoint.restore(
              init_path
          ).run_restore_ops(),
      )
      self.evaluate(v.initializer)
  
      # First call should call `init_fn`.
      self.assertIsNone(manager.restore_or_initialize())
      self.assertEqual(2.0, self.evaluate(v))
  
      # Save a checkpoint and second call should restore from the checkpoints.
      manager.save()
      self.assertIsNotNone(manager.restore_or_initialize())
  
imports: import contextlib
  import os
  import pathlib
  import shutil
  import tempfile
  from google.protobuf import text_format
  from tensorflow.core.protobuf import saver_pb2
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.checkpoint import checkpoint_management
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.training import saver
  from tensorflow.python.training.checkpoint_state_pb2 import CheckpointState
label_desc: Use image node_id 8 for calling the CheckpointManagerTest obj's underlying member method code with example usage: obj.testRestoreOrInitialize() without return types