class_docstr: BoolTensorGenerator generates tf.Tensor with dtype in tf.bool.
docstr: Create a new BoolTensorGenerator.
  
  The generated bool value has equal true and false possibility.
  
  Args:
    spec: A tf.TensorSpec that describes the output tensor.
  
  Raises:
    TypeError: If dtype in spec is not tf.bool.
docstr_tok: ["Create","a","new","BoolTensorGenerator",".","The","generated","bool","value","has","equal","true","and","false","possibility",".","Args",":","spec",":","A","tf.TensorSpec","that","describes","the","output","tensor",".","Raises",":","TypeError",":","If","dtype","in","spec","is","not","tf.bool","."]
code: def __init__(self, spec):
      """Create a new BoolTensorGenerator.
  
      The generated bool value has equal true and false possibility.
  
      Args:
        spec: A tf.TensorSpec that describes the output tensor.
  
      Raises:
        TypeError: If dtype in spec is not tf.bool.
      """
      super().__init__(spec)
  
      if spec.dtype is not tf.bool:
          raise TypeError(
              "BoolTensorGenerator can only generate tf.Tensor with "
              f"dtype in tf.bool but found {spec.dtype}."
          )
  
imports: 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 1 to create a new BoolTensorGenerator object from inherited base classes: TensorGeneratorBase with example: obj = BoolTensorGenerator(spec)