class_docstr: A light-weight wrapper class for torch.distributed API.
  Only a subset of functions are wrapped. Once the init_process_group
  is initialized, standard torch.distributed.* can be used directly
  so no need to wrap all the functions. We can keep adding wrappers as
  needed.
class_docstr_tok: ["A","light-weight","wrapper","class","for","torch.distributed","API",".","Only","a","subset","of","functions","are","wrapped",".","Once","the","init_process_group","is","initialized",",","standard","torch.distributed",".","*","can","be","used","directly","so","no","need","to","wrap","all","the","functions",".","We","can","keep","adding","wrappers","as","needed","."]
code: def all_gather_coalesced(
      self, output_tensors, input_tensors, group=None, async_op=False
  ):
      """"""
      assert len(output_tensors) == len(input_tensors), ""
      if hasattr(
          torch.distributed.distributed_c10d,
          "_all_gather_base_coalesced",
      ):
          # customized PyTorch
          return torch.distributed.distributed_c10d._all_gather_base_coalesced(
              output_tensors,
              input_tensors,
              group=group,
              async_op=async_op,
          )
      elif has_coalescing_manager():
          reqs = []
          with get_coalescing_manager(
              group, input_tensors[0].device, reqs, async_op
          ):
              for output, input in zip(output_tensors, input_tensors):
                  handle = torch.distributed.distributed_c10d.all_gather_into_tensor(
                      output, input, group=group, async_op=True
                  )
                  reqs.append(handle)
          if async_op:
              return reqs[-1]
          else:
              reqs[-1].wait()
  
imports: from deepspeed import utils
  from .utils import *
  from .backend import *
  from .comm import *
  import os
label_desc: Use image node_id 16 for calling the TorchBackend obj's underlying member method code with example usage: obj.all_gather_coalesced(output_tensors, input_tensors, group, async_op) and returns: torch, reqs