code: def send(tensor, dest_stage, async_op=False):
      global _groups
      assert async_op == False, "Doesn't support async_op true"
      src_stage = _grid.get_stage_id()
      _is_valid_send_recv(src_stage, dest_stage)
  
      dest_rank = _grid.stage_to_global(stage_id=dest_stage)
      if async_op:
          global _async
          op = dist.isend(tensor, dest_rank)
          _async.append(op)
      else:
          if can_send_recv():
              return dist.send(tensor, dest_rank)
          else:
              group = _get_send_recv_group(src_stage, dest_stage)
              src_rank = _grid.stage_to_global(stage_id=src_stage)
              return dist.broadcast(
                  tensor, src_rank, group=group, async_op=async_op
              )
  
file_path: deepspeed/deepspeed/runtime/pipe/p2p.py
imports: import pickle
  import typing
  import torch
  from deepspeed import comm
  from packaging.version import Version
  from deepspeed.git_version_info import torch_info
  from deepspeed.accelerator import get_accelerator
label_desc: Use image node_id 4 for calling a global function with example usage: send(tensor, dest_stage, async_op) and returns: dist, dist