class_docstr: Base of SparseTensorGenerator that generates tf.sparse.SparseTensor.
class_docstr_tok: ["Base","of","SparseTensorGenerator","that","generates","tf.sparse.SparseTensor","."]
code: def _get_num_values(self, shape):
      ret = 0
      if self._value_dist == None:
          ret = self._num_values
      else:
          ret = np.random.randint(
              *_VALUE_DISTRIBUTION_TO_RANGE[self._value_dist]
          )
      return min(ret, np.prod(shape))
  
imports: import enum
  import random
  import hashlib
  import numpy
  import tensorflow
  from tests.test_atds_avro.utils.generator.generator_base import Generator
  from tests.test_atds_avro.utils.hash_util import int_to_bytes
label_desc: Use image node_id 2 for calling the SparseTensorGeneratorBase obj's underlying member method code with example usage: obj._get_num_values(shape) and returns: min