code: def all_gather_tensor_2p5d(
      inputs: Tensor, dim: int, col_parallel_mode: ParallelMode
  ) -> Tensor:
      r"""all gather the weight of 2.5D parallelism.
  
      Args:
          inputs (:class:`torch.tensor`): input tensor.
          dim (int): dimension of all-gather.
          col_parallel_mode (:class:`colossalai.legacy.context.ParallelMode`): column parallel mode.
  
      Note:
          The parallel_mode should be concluded in ``ParallelMode``. More details about ``ParallelMode`` could be found
          in `parallel_mode <https://github.com/hpcaitech/ColossalAI/blob/main/colossalai/context/parallel_mode.py>`_.
      """
      return _AllGatherTensor2p5D.apply(inputs, dim, col_parallel_mode)
  
imports: from typing import Any, Tuple
  import torch
  import torch.distributed
  from torch import Tensor
  from torch.cuda.amp import custom_bwd, custom_fwd
  from colossalai.legacy.communication.collective import all_gather, all_reduce, reduce_scatter
  from colossalai.legacy.context.parallel_mode import ParallelMode
  from colossalai.legacy.core import global_context
  from colossalai.utils import get_current_device
label_desc: Use image node_id 7 for calling a global function with example usage: all_gather_tensor_2p5d(inputs, dim, col_parallel_mode) and returns: _AllGatherTensor2p5D