docstr: Set group_size = num_gpus = 2 for all tests in this class.
docstr_tok: ["Set","group_size","=","num_gpus","=","2","for","all","tests","in","this","class","."]
code: def setUpClass(cls):
      """Set group_size = num_gpus = 2 for all tests in this class."""
      super(CollectiveOpGPUTest, cls).setUpClass()
      # Group size is the number of devices in a group communicating collectively.
      # This will be passed into the collective ops in the tests below.
      cls._group_size = 2
      cls._devices = ["/device:GPU:{}".format(i) for i in range(2)]
      os.environ["NCCL_DEBUG"] = "INFO"
      os.environ["NCCL_LAUNCH_MODE"] = "PARALLEL"
  
imports: import os
  import threading
  import time
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import collective_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the CollectiveOpGPUTest obj's underlying member method code with example usage: obj.setUpClass(cls) without return types