code: def send_obj_meta(obj, need_meta=True, next_rank=None) -> bool:
      """Sends obj meta information before sending a specific obj.
      Since the recipient must know the shape of the obj in p2p communications,
      meta information of the obj should be sent before communications. This function
      synchronizes with :func:`recv_obj_meta`.
  
      Args:
          obj (Union[:class:`torch.Tensor`, List[:class:`torch.Tensor`]]): obj to be sent.
          need_meta (bool, optional): If False, meta information won't be sent.
          next_rank (int): The rank of the next member in pipeline parallel group.
  
      Returns:
          bool: False
      """
      if need_meta:
          if next_rank is None:
              next_rank = gpc.get_next_global_rank(
                  ParallelMode.PIPELINE
              )
  
          tensor_kwargs = {
              "dtype": torch.long,
              "device": get_current_device(),
          }
          if isinstance(obj, torch.Tensor):
              send_obj_nums = torch.tensor(1, **tensor_kwargs)
              dist.send(send_obj_nums, next_rank)
              send_meta_helper(obj, next_rank, tensor_kwargs)
          else:
              send_obj_nums = torch.tensor(len(obj), **tensor_kwargs)
              dist.send(send_obj_nums, next_rank)
              for tensor_to_send in obj:
                  send_meta_helper(
                      tensor_to_send, next_rank, tensor_kwargs
                  )
  
      return False
  
file_path: ColossalAI/colossalai/legacy/communication/utils.py
imports: from typing import List, Tuple, Union
  import torch
  import torch.distributed
  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 2 for calling a global function with example usage: send_obj_meta(obj, need_meta, next_rank) and returns: False