code: def test_dense_to_sparse_1d_bool(self):
      st = sparse.dense_to_sparse([True, False, True, False])
      result = self.evaluate(st)
      self.assertEqual(result.indices.dtype, np.int64)
      self.assertEqual(result.values.dtype, np.bool_)
      self.assertEqual(result.dense_shape.dtype, np.int64)
      self.assertAllEqual([[0], [2]], result.indices)
      self.assertAllEqual([True, True], result.values)
      self.assertAllEqual([4], result.dense_shape)
  
file_path: probability/tensorflow_probability/python/math/sparse_test.py
imports: import numpy
  import tensorflow.compat.v1
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import sparse
label_desc: Use image node_id 3 for calling the SparseTest obj's underlying member method code with example usage: obj.test_dense_to_sparse_1d_bool() without return types