code: def _check_key(node_index, key):
      if node_index != key:
          raise ValueError(
              "Nodes of the networkx.OrderedMultiDiGraph must have sequential "
              "integer keys consistent with the order of the nodes (e.g. "
              "`list(graph_nx.nodes)[i] == i`), found node with index {} and key {}".format(
                  node_index, key
              )
          )
  
      return True
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from graph_nets import graphs
  import networkx
  import numpy
  from six.moves import range
  from six.moves import zip
label_desc: Use image node_id 5 for calling a global function with example usage: _check_key(node_index, key) and returns: True