code: def _get_correct_mapping(original_index, nodes):
      # Special handle for the index is -1 case.
      # If it is -1, return the last index.
      if original_index == -1:
          node_indices = nodes.keys()
          node_indices = sorted(node_indices)
          return node_indices[-1]
      return original_index
  
imports: import collections
  import copy
  import json
  import uuid
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.framework import node_def_pb2
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.framework.graph_util_impl import _bfs_for_reachable_nodes
  from tensorflow.python.framework.graph_util_impl import _extract_graph_summary
  from tensorflow.python.ops import array_ops
  from tensorflow.python.util import compat
  from tensorflow.python.util import deprecation
  from tensorflow.python.util.all_util import remove_undocumented
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 11 for calling a global function with example usage: _get_correct_mapping(original_index, nodes) and returns: original_index, node_indices