code: def copy_scoped_meta_graph(
      from_scope, to_scope, from_graph=None, to_graph=None
  ):
      """Copies a sub-meta_graph from one scope to another.
  
      Args:
        from_scope: `String` name scope containing the subgraph to be copied.
        to_scope: `String` name scope under which the copied subgraph will reside.
        from_graph: Optional `Graph` from which to copy the subgraph. If `None`, the
          default graph is use.
        to_graph: Optional `Graph` to which to copy the subgraph. If `None`, the
          default graph is used.
  
      Returns:
        A dictionary of `Variables` that has been copied into `to_scope`.
  
      Raises:
        ValueError: If `from_scope` and `to_scope` are the same while
          `from_graph` and `to_graph` are also the same.
      """
      from_graph = from_graph or ops.get_default_graph()
      to_graph = to_graph or ops.get_default_graph()
  
      if from_graph == to_graph and from_scope == to_scope:
          raise ValueError(
              "'from_scope' and 'to_scope' need to be different "
              "when performing copy in the same graph. "
              f"Received: 'from_graph': {from_graph}, "
              f"'to_graph': {to_graph}, "
              f"'from_scope': {from_scope}, 'to_scope': {to_scope}."
          )
  
      orig_meta_graph, var_list = export_scoped_meta_graph(
          export_scope=from_scope, graph=from_graph
      )
      var_list = import_scoped_meta_graph(
          orig_meta_graph, graph=to_graph, import_scope=to_scope
      )
      return var_list
  
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 17 for calling a global function with example usage: copy_scoped_meta_graph(from_scope, to_scope, from_graph, to_graph) and returns: var_list