code: def _make_sparse_fn(n, fill):
      rng = np.random.default_rng(1234)
      slots = n**2
      filled = max(int(slots * fill), 1)
      pos = rng.choice(slots, size=filled, replace=False)
      posx, posy = divmod(pos, n)
      data = rng.standard_normal(len(pos))
      coo = sps.coo_matrix((data, (posx, posy)), shape=(n, n))
  
      def sparse_action(x):
          coo_typed = coo.astype(np.dtype(x.dtype))
          sps_mat = bcoo.BCOO.from_scipy_sparse(coo_typed)
          dn = (((1,), (0,)), ((), ()))  # Good old fashioned matmul.
          x = bcoo.bcoo_dot_general(sps_mat, x, dimension_numbers=dn)
          sps_mat_T = sps_mat.transpose()
          return bcoo.bcoo_dot_general(
              sps_mat_T, x, dimension_numbers=dn
          )
  
      dense = coo.todense()
      _, s, _ = np.linalg.svd(dense, full_matrices=False)
      return sparse_action, s**2, 20
  
imports: import functools
  import re
  import os
  import unittest
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import scipy.linalg
  import scipy.sparse
  import jax
  from jax import config
  from jax._src import test_util
  from jax.experimental.sparse import linalg, bcoo
  import jax.numpy
label_desc: Use image node_id 12 for calling a global function with example usage: _make_sparse_fn(n, fill) and returns: sparse_action,  unknown,  int, bcoo