docstr: Tests sparse COO matrix is correctly converted to a GraphsTuple.
docstr_tok: ["Tests","sparse","COO","matrix","is","correctly","converted","to","a","GraphsTuple","."]
code: def test_sparse_matrix_to_graphs_tuple(self):
      """Tests sparse COO matrix is correctly converted to a GraphsTuple."""
      _, sparse_adj_matrices, expected_graphs = _get_list_matrix()
      for sparse_matrix, expected_graph in zip(
          sparse_adj_matrices, expected_graphs
      ):
          senders, receivers, values, n_node = sparse_matrix
          from_sparse_graph = utils.sparse_matrix_to_graphs_tuple(
              senders, receivers, values, n_node
          )
          jax.tree_util.tree_map(
              np.testing.assert_allclose,
              from_sparse_graph,
              expected_graph,
          )
  
imports: import functools
  import os
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax.lib import xla_bridge
  import jax.numpy
  import jax.tree_util
  from jraph._src import graph
  from jraph._src import utils
  import numpy
label_desc: Use image node_id 1 for calling the AdjacencyMatrixTest obj's underlying member method code with example usage: obj.test_sparse_matrix_to_graphs_tuple() without return types