docstr: If the "features" field is not present in the nodes or edges.
docstr_tok: ["If","the","``","features","''","field","is","not","present","in","the","nodes","or","edges","."]
code: def test_networkxs_to_graphs_tuple_raises_key_error(self):
      """If the "features" field is not present in the nodes or edges."""
      graph_nx = _single_data_dict_to_networkx(self.graphs_dicts_in[-1])
      first_node = list(graph_nx.nodes(data=True))[0]
      del first_node[1]["features"]
      with self.assertRaisesRegexp(
          KeyError,
          "This could be due to the node having been silently added",
      ):
          utils_np.networkxs_to_graphs_tuple([graph_nx])
      graph_nx = _single_data_dict_to_networkx(self.graphs_dicts_in[-1])
      first_edge = list(graph_nx.edges(data=True))[0]
      del first_edge[2]["features"]
      with self.assertRaises(KeyError):
          utils_np.networkxs_to_graphs_tuple([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 5 for calling the NetworkxConversionTest obj's underlying member method code with example usage: obj.test_networkxs_to_graphs_tuple_raises_key_error() without return types