code: def testErrors(self):
      with self.assertRaisesRegex(
          ValueError, "Device assignment .* required"
      ):
          nccl_ops.all_sum(
              [array_ops.identity(np.random.random_sample((3, 4)))]
          )
      with self.assertRaisesRegex(ValueError, "Must pass >0 tensors"):
          nccl_ops.all_sum([])
  
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 AllReduceTest obj's underlying member method code with example usage: obj.testErrors() without return types