code: def import_scoped_meta_graph(
      meta_graph_or_file,
      clear_devices=False,
      graph=None,
      import_scope=None,
      input_map=None,
      unbound_inputs_col_name="unbound_inputs",
      restore_collections_predicate=(lambda key: True),
  ):
      """Recreates a `Graph` saved in a `MetaGraphDef` proto.
  
      This function takes a `MetaGraphDef` protocol buffer as input. If
      the argument is a file containing a `MetaGraphDef` protocol buffer ,
      it constructs a protocol buffer from the file content. The function
      then adds all the nodes from the `graph_def` field to the
      current graph, recreates the desired collections, and returns a dictionary of
      all the Variables imported into the name scope.
  
      In combination with `export_scoped_meta_graph()`, this function can be used to
  
      * Serialize a graph along with other Python objects such as `QueueRunner`,
        `Variable` into a `MetaGraphDef`.
  
      * Restart training from a saved graph and checkpoints.
  
      * Run inference from a saved graph and checkpoints.
  
      Args:
        meta_graph_or_file: `MetaGraphDef` protocol buffer or filename (including
          the path) containing a `MetaGraphDef`.
        clear_devices: Boolean which controls whether to clear device information
          from graph_def. Default false.
        graph: The `Graph` to import into. If `None`, use the default graph.
        import_scope: Optional `string`. Name scope into which to import the
          subgraph. If `None`, the graph is imported to the root name scope.
        input_map: A dictionary mapping input names (as strings) in `graph_def` to
          `Tensor` objects. The values of the named input tensors in the imported
          graph will be re-mapped to the respective `Tensor` values.
        unbound_inputs_col_name: Collection name for looking up unbound inputs.
        restore_collections_predicate: a predicate on collection names. A collection
          named c (i.e whose key is c) will be restored iff
          1) `restore_collections_predicate(c)` is True, and
          2) `c != unbound_inputs_col_name`.
  
      Returns:
        A dictionary of all the `Variables` imported into the name scope.
  
      Raises:
        ValueError: If the graph_def contains unbound inputs.
      """
      return import_scoped_meta_graph_with_return_elements(
          meta_graph_or_file,
          clear_devices,
          graph,
          import_scope,
          input_map,
          unbound_inputs_col_name,
          restore_collections_predicate,
      )[0]
  
imports: import copy
  from packaging import version
  import os.path
  import re
  import sys
  from google.protobuf.any_pb2 import Any
  from google.protobuf import text_format
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.framework import op_def_pb2
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.core.protobuf import saver_pb2
  from tensorflow.python.client import pywrap_tf_session
  from tensorflow.python.eager import context
  from tensorflow.python.framework import byte_swap_tensor
  from tensorflow.python.framework import error_interpolation
  from tensorflow.python.framework import graph_io
  from tensorflow.python.framework import importer
  from tensorflow.python.framework import op_def_registry
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import versions
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import compat
label_desc: Use image node_id 14 for calling a global function with example usage: import_scoped_meta_graph(meta_graph_or_file, clear_devices, graph, import_scope, input_map, unbound_inputs_col_name, restore_collections_predicate) and returns: import_scoped_meta_graph_with_return_elements