docstr: AllReduce a list of tensors following options.
  
  Args:
      tensor: the tensor to be reduced, each tensor locates on CPU
      allreduce_options:
  
  Returns:
      None
docstr_tok: ["AllReduce","a","list","of","tensors","following","options",".","Args",":","tensor",":","the","tensor","to","be","reduced",",","each","tensor","locates","on","CPU","allreduce_options",":","Returns",":","None"]
code: def allreduce(self, tensors, allreduce_options=AllReduceOptions()):
      """AllReduce a list of tensors following options.
  
      Args:
          tensor: the tensor to be reduced, each tensor locates on CPU
          allreduce_options:
  
      Returns:
          None
      """
  
      def collective_fn(input_tensor, output_tensor, context):
          pygloo.allreduce(
              context,
              gloo_util.get_tensor_ptr(input_tensor),
              gloo_util.get_tensor_ptr(output_tensor),
              gloo_util.get_tensor_n_elements(input_tensor),
              gloo_util.get_gloo_tensor_dtype(input_tensor),
              gloo_util.get_gloo_reduce_op(allreduce_options.reduceOp),
          )
  
      self._collective(tensors, tensors, collective_fn)
  
imports: import datetime
  import logging
  import os
  import shutil
  import time
  import numpy
  import pygloo
  import ray
  from ray._private import ray_constants
  from ray.util.collective.collective_group import gloo_util
  from ray.util.collective.collective_group.base_collective_group import BaseGroup
  from ray.util.collective.const import get_store_name
  from ray.util.collective.types import AllGatherOptions, AllReduceOptions, Backend, BarrierOptions, BroadcastOptions, RecvOptions, ReduceOptions, ReduceScatterOptions, SendOptions
label_desc: Use image node_id 4 for calling the GLOOGroup obj's underlying member method code with example usage: obj.allreduce(tensors, allreduce_options) without return types