def test_name_scope(self):
    """Tests that the name scope are correctly pushed through this function."""
    graph = self._graph
    with tf.name_scope("test"):
      graph_id = utils_tf.identity(graph)
    for field in [
        "nodes", "edges", "globals", "receivers", "senders", "n_node", "n_edge"
    ]:
      self.assertEqual("test", getattr(graph_id, field).name.split("/")[0])
Tests that the name scope are correctly pushed through this function.
graph_nets/tests/utils_tf_test.py