code: def testAllToAllOnBool(self):
      # TODO(b/193531363): Track the work to support int32 reduce.
      self.skipForDeviceType(
          ["GPU"], "GPUs do not support int32 collective reduce"
      )
      self.skipForDeviceType(
          ["TPU"],
          "This test only needs to run on 2 cores.",
          unless_device_count_equals_to=2,
      )
  
      a = constant_op.constant(
          np.array(
              [[True, False, False, True], [False, False, False, True]]
          ),
          dtype=dtypes.bool,
      )
      sharded_a = api.relayout(
          a, self.first_dimension_sharded_layout_2d
      )
      unsharded_a = api.relayout(
          sharded_a, self.fully_replicated_layout_2d
      )
  
      self.assertDTensorEqual(
          a, self.fully_replicated_layout_2d, unsharded_a
      )
  
imports: import os
  from absl.testing import parameterized
  import numpy
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python import d_variable
  from tensorflow.dtensor.python import dtensor_device
  from tensorflow.dtensor.python import layout
  from tensorflow.dtensor.python.tests import test_backend_util
  from tensorflow.dtensor.python.tests import test_util
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the CollectiveTest obj's underlying member method code with example usage: obj.testAllToAllOnBool() without return types