docstr: Either all nodes (resp. edges) should have features, or none of them.
docstr_tok: ["Either","all","nodes","(","resp",".","edges",")","should","have","features",",","or","none","of","them","."]
code: def test_networkxs_to_graphs_tuple_raises_assertion_error(self):
      """Either all nodes (resp. edges) should have features, or none of them."""
      graph_nx = _single_data_dict_to_networkx(self.graphs_dicts_in[-1])
      first_node = list(graph_nx.nodes(data=True))[0]
      first_node[1]["features"] = None
      with self.assertRaisesRegexp(
          ValueError, "Either all the nodes should have features"
      ):
          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]
      first_edge[2]["features"] = None
      with self.assertRaisesRegexp(
          ValueError, "Either all the edges should have features"
      ):
          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 6 for calling the NetworkxConversionTest obj's underlying member method code with example usage: obj.test_networkxs_to_graphs_tuple_raises_assertion_error() without return types