class_docstr: FloatSparseTensorGenerator generates tf.sparse.SparseTensor with dtype in tf.float32
  or tf.float64.
class_docstr_tok: ["FloatSparseTensorGenerator","generates","tf.sparse.SparseTensor","with","dtype","in","tf.float32","or","tf.float64","."]
code: def generate(self):
      shape = self._get_shape()
      num_values = self._get_num_values(shape)
      vals = np.random.rand(num_values)
      if self.spec.dtype == tf.float32:
          vals = vals.astype(np.float32)
      coords = self._generate_random_coords(num_values, shape)
      return tf.SparseTensor(
          indices=coords, values=vals, dense_shape=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 FloatSparseTensorGenerator obj's underlying member method code with example usage: obj.generate() and returns: tf