code: def testCPUGPUMatch(self):
      # Skip the test if there is no GPU.
      if not test.is_gpu_available():
          return
  
      for dt in get_float_types():
          results = {}
          for use_gpu in [False, True]:
              # We need a particular larger number of samples to test multiple rounds
              # on GPU
              sampler = self._Sampler(
                  1000000, 0.0, 1.0, dt, use_gpu=use_gpu, seed=12345
              )
              results[use_gpu] = sampler()
          atol = rtol = 1e-6
          if dt == dtypes.float16:
              atol = rtol = 1e-3
          if dt == dtypes.bfloat16:
              atol = rtol = 1e-1
          self.assertAllClose(
              results[False], results[True], rtol=rtol, atol=atol
          )
  
imports: import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_random_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the TruncatedNormalTest obj's underlying member method code with example usage: obj.testCPUGPUMatch() without return types