def test_data_dicts_to_graphs_tuple_infer_n_node(self):
    """Not having nodes is fine if providing the number of nodes."""
    for graph_dict in self.graphs_dicts_in:
      graph_dict["n_node"] = graph_dict["nodes"].shape[0]
      graph_dict["nodes"] = None
    out = utils_np.data_dicts_to_graphs_tuple(self.graphs_dicts_in)
    self.assertAllEqual([0, 1, 1, 1, 2, 2, 2], out.n_node)
Not having nodes is fine if providing the number of nodes.
graph_nets/tests/utils_np_test.py