docstr: If the nodes have keys not consistent with the order they were added.
docstr_tok: ["If","the","nodes","have","keys","not","consistent","with","the","order","they","were","added","."]
code: def test_networkxs_to_data_dict_raises_node_key_error(self):
      """If the nodes have keys not consistent with the order they were added."""
      graph_nx = nx.OrderedMultiDiGraph()
      graph_nx.add_node(0, features=None)
      graph_nx.add_node(1, features=None)
      graph_nx.add_node(3, features=None)
  
      with self.assertRaisesRegexp(
          ValueError, "found node with index 2 and key 3"
      ):
          utils_np.networkx_to_data_dict(graph_nx)
  
      # Check that it is still raised even if there is a node with each key,
      # and only the order is wrong.
      graph_nx.add_node(2, features=None)
      with self.assertRaisesRegexp(
          ValueError, "found node with index 2 and key 3"
      ):
          utils_np.networkx_to_data_dict(graph_nx)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  from graph_nets import utils_np
  from graph_nets.tests import test_utils
  import networkx
  import numpy
  from six.moves import range
  import tensorflow
label_desc: Use image node_id 4 for calling the NetworkxConversionTest obj's underlying member method code with example usage: obj.test_networkxs_to_data_dict_raises_node_key_error() without return types