code: def testInitFromCheckpointMissing(self):
      checkpoint_dir = self.get_temp_dir()
      with self.cached_session() as session:
          _, _, _, _ = _create_checkpoints(session, checkpoint_dir)
  
      # New graph and session.
      with ops.Graph().as_default() as g:
          with self.session(graph=g) as session:
              with variable_scope.variable_scope("some_scope"):
                  _ = variable_scope.get_variable("my1", [10, 10])
                  _ = variable_scope.get_variable(
                      "my2",
                      [1, 10],
                      dtype=dtypes.int64,
                      initializer=init_ops.zeros_initializer(),
                  )
  
              # No directory.
              with self.assertRaises(errors_impl.OpError):
                  checkpoint_utils.init_from_checkpoint(
                      "no_dir", {"var1": "some_scope/my1"}
                  )
  
              # No variable in checkpoint.
              with self.assertRaises(ValueError):
                  checkpoint_utils.init_from_checkpoint(
                      checkpoint_dir, {"no_var": "some_scope/my1"}
                  )
  
              # No variable in the graph.
              with self.assertRaises(ValueError):
                  checkpoint_utils.init_from_checkpoint(
                      checkpoint_dir, {"var3": "some_scope/no_var"}
                  )
  
              # Shape mismatch.
              with self.assertRaises(ValueError):
                  checkpoint_utils.init_from_checkpoint(
                      checkpoint_dir, {"var1": "some_scope/my1"}
                  )
  
              # Variable 'my1' and 'my2' are missing in given checkpoint scope.
              with self.assertRaises(ValueError):
                  checkpoint_utils.init_from_checkpoint(
                      checkpoint_dir, {"useful_scope/": "some_scope/"}
                  )
  
              # Mapping is not to scope name.
              with self.assertRaises(ValueError):
                  checkpoint_utils.init_from_checkpoint(
                      checkpoint_dir, {"useful_scope": "some_scope/"}
                  )
  
imports: import os
  import pathlib
  import time
  import numpy
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.client import session
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import partitioned_variables
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import test
  from tensorflow.python.training import checkpoint_utils
  from tensorflow.python.training import saver
label_desc: Use image node_id 13 for calling the CheckpointsTest obj's underlying member method code with example usage: obj.testInitFromCheckpointMissing() without return types