code: def recv(tensor, src_stage, async_op=False):
      global _groups
      assert async_op == False, "Doesn't support async_op true"
      dest_stage = _grid.get_stage_id()
      _is_valid_send_recv(src_stage, dest_stage)
  
      src_rank = _grid.stage_to_global(stage_id=src_stage)
  
      if async_op:
          global _async
          op = dist.irecv(tensor, src_rank)
          _async.append(op)
      else:
          if can_send_recv():
              return dist.recv(tensor, src_rank)
          else:
              group = _get_send_recv_group(src_stage, dest_stage)
              return dist.broadcast(
                  tensor, src_rank, group=group, async_op=async_op
              )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/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
label_desc: Use image node_id 5 for calling a global function with example usage: recv(tensor, src_stage, async_op) and returns: dist, dist