code: def testBroadcastToCpuError(self):
      try:
          # Broadcasts to CPU is not supported.
          self._Test(
              _NcclBroadcast,
              lambda x, y: x,
              (["/device:GPU:0", "/device:CPU:0"],),
          )
      except errors.NotFoundError as e:
          self.assertRegex(
              str(e),
              "No registered '_NcclBroadcastRecv' OpKernel for CPU devices",
          )
      else:
          # Session isn't executed when no GPU is available.
          if test.is_gpu_available():
              self.fail(
                  "Didn't raise NotFoundError trying to broadcast to CPU"
              )
  
imports: from functools import partial
  import numpy
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients
  from tensorflow.python.ops import nccl_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the BroadcastTest obj's underlying member method code with example usage: obj.testBroadcastToCpuError() without return types