code: def _s2d_add_vs_sparse_add(sparsity, n, m, num_iters=50):
      np.random.seed(1618)
  
      with session.Session(graph=ops.Graph()) as sess:
          sp_vals = np.random.rand(n, m).astype(np.float32)
          sp_t, unused_nnz = _sparsify(
              sp_vals, thresh=sparsity, index_dtype=np.int32
          )
          vals = np.random.rand(n, m).astype(np.float32)
  
          s2d = math_ops.add(
              sparse_ops.sparse_tensor_to_dense(sp_t),
              constant_op.constant(vals),
          )
          sa = sparse_ops.sparse_add(sp_t, constant_op.constant(vals))
  
          timeit.timeit(lambda: sess.run(s2d), number=3)
          timeit.timeit(lambda: sess.run(sa), number=3)
  
          s2d_total = timeit.timeit(
              lambda: sess.run(s2d), number=num_iters
          )
          sa_total = timeit.timeit(
              lambda: sess.run(sa), number=num_iters
          )
  
      # per-iter latency; secs to millis
      return s2d_total * 1e3 / num_iters, sa_total * 1e3 / num_iters
  
imports: import timeit
  import numpy
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import sparse_ops
  import tensorflow.python.ops.sparse_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling a global function with example usage: _s2d_add_vs_sparse_add(sparsity, n, m, num_iters) and returns: unknown,  unknown