docstr: A base function to test different scenarios.
code: def RunningAllreduceWithGPUs(self, gpu_ids, allreduce_function):
      """A base function to test different scenarios."""
      net = core.Net("mujitest")
      for id in gpu_ids:
          net.ConstantFill(
              [],
              "testblob_gpu_" + str(id),
              shape=[1, 2, 3, 4],
              value=float(id + 1),
              device_option=muji.OnGPU(id),
          )
      allreduce_function(
          net,
          ["testblob_gpu_" + str(i) for i in gpu_ids],
          "_reduced",
          gpu_ids,
      )
      workspace.RunNetOnce(net)
      target_value = sum(gpu_ids) + len(gpu_ids)
      all_blobs = workspace.Blobs()
      all_blobs.sort()
      for blob in all_blobs:
          print("{} {}".format(blob, workspace.FetchBlob(blob)))
  
      for idx in gpu_ids:
          blob = workspace.FetchBlob(
              "testblob_gpu_" + str(idx) + "_reduced"
          )
          np.testing.assert_array_equal(
              blob,
              target_value,
              err_msg="gpu id %d of %s" % (idx, str(gpu_ids)),
          )
  
file_path: pytorch/caffe2/python/muji_test.py
imports: import numpy
  import unittest
  from caffe2.python import core, workspace, muji, test_util
label_desc: Use image node_id 1 for calling the TestMuji obj's underlying member method code with example usage: obj.RunningAllreduceWithGPUs(gpu_ids, allreduce_function) without return types