code: def _buildInitialVars(self, shape, dev_list):
      values = []
      num_devices = len(dev_list)
      dim = np.prod(shape, dtype=int) if shape else 1
      for d in range(0, num_devices):
          with ops.device(dev_list[d]):
              npt = np.zeros(shape).astype(np.float32)
              alias = np.frombuffer(npt.data, dtype=np.float32)
              for i in range(0, dim):
                  alias[i] = i + 0.01 * d
              var = state_ops.variable_op(shape, types_pb2.DT_FLOAT)
              state_ops.init_variable(var, npt).op.run()
              values.append(var)
      return values
  
imports: import time
  import numpy
  from tensorflow.core.framework import types_pb2
  from tensorflow.python.distribute.v1 import all_reduce
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import state_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 5 for calling the AllReduceTest obj's underlying member method code with example usage: obj._buildInitialVars(shape, dev_list) and returns: values