code: def _random_sparse_tensor(shape, min_value=0.0, max_value=1.0):
      """Return sparse tensor."""
  
      elements = np.random.uniform(
          low=min_value, high=max_value, size=shape
      )
      # By including sparsity we test elements whose logs are -inf.
      sparsity = np.random.rand(*shape) < 0.5
      return tf.where(sparsity, elements, np.zeros(shape))
  
imports: import hypothesis
  from hypothesis.extra import numpy
  import hypothesis.strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.marginalize.logeinsumexp import _binary_einslogsumexp
  from tensorflow_probability.python.experimental.marginalize.logeinsumexp import logeinsumexp
  from tensorflow_probability.python.internal import test_util
  import tensorflow_probability.python.internal.hypothesis_testlib
label_desc: Use image node_id 2 for calling a global function with example usage: _random_sparse_tensor(shape, min_value, max_value) and returns: tf