code: def matvec(mat, v):
      v = jnp.asarray(v)
      assert v.ndim == 1
      assert len(mat.shape) == 2
      assert v.shape[0] == mat.shape[1]
      rows = mat.indices[:, 0]
      cols = mat.indices[:, 1]
      dv = mat.data * v[cols]
      return jnp.zeros(mat.shape[0], dtype=dv.dtype).at[rows].add(dv)
  
imports: from absl.testing import absltest
  import math
  import unittest
  import numpy
  import jax.numpy
  from jax import jit, lax, make_jaxpr
  from jax import config
  from jax.interpreters import mlir
  from jax.interpreters import xla
  from jax._src import core
  from jax._src import dtypes
  from jax._src import test_util
  from jax._src import xla_bridge
  from jax._src.lib.mlir import ir
  from jax._src.lib import xla_client
label_desc: Use image node_id 16 for calling a global function with example usage: matvec(mat, v) and returns: jnp