def test_field_must_not_be_none(self, none_fields):
    """Tests that the model cannot be built if required fields are missing."""
    input_graph = utils_tf.data_dicts_to_graphs_tuple([SMALL_GRAPH_1])
    input_graph = input_graph.map(lambda _: None, none_fields)
    comm_net = self._get_model()
    with self.assertRaises(ValueError):
      comm_net(input_graph)
Tests that the model cannot be built if required fields are missing.
graph_nets/tests_tf2/modules_test.py