docstr: A method to encapsulate all collective calls.
  
  Args:
      input_tensors: the list of the input tensors.
      output_tensors: the list of the output tensors.
      collective_fn: the collective function call.
      preprocess_fn: preprocess procedures before collective calls.
      postprocess_fn: postprocess procedures after collective calls.
  
  Returns:
      None
docstr_tok: ["A","method","to","encapsulate","all","collective","calls",".","Args",":","input_tensors",":","the","list","of","the","input","tensors",".","output_tensors",":","the","list","of","the","output","tensors",".","collective_fn",":","the","collective","function","call",".","preprocess_fn",":","preprocess","procedures","before","collective","calls",".","postprocess_fn",":","postprocess","procedures","after","collective","calls",".","Returns",":","None"]
code: def _collective(
      self,
      input_tensors,
      output_tensors,
      collective_fn,
      preprocess_fn=None,
      postprocess_fn=None,
  ):
      """A method to encapsulate all collective calls.
  
      Args:
          input_tensors: the list of the input tensors.
          output_tensors: the list of the output tensors.
          collective_fn: the collective function call.
          preprocess_fn: preprocess procedures before collective calls.
          postprocess_fn: postprocess procedures after collective calls.
  
      Returns:
          None
      """
      _check_cpu_tensors(input_tensors)
      _check_cpu_tensors(output_tensors)
  
      if preprocess_fn:
          preprocess_fn()
      collective_fn(
          input_tensors[0], output_tensors[0], self._gloo_context
      )
      if postprocess_fn:
          postprocess_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 12 for calling the GLOOGroup obj's underlying member method code with example usage: obj._collective(input_tensors, output_tensors, collective_fn, preprocess_fn, postprocess_fn) without return types