code: def send_obj(msg: typing.Any, dest: int):
      """Send an arbitrary python object to ``dest``.
  
      Note: ``msg`` must be pickleable.
  
      WARN: This incurs a CPU -> GPU transfer and should be used sparingly
      for performance reasons.
  
      Args:
          msg (typing.Any): The object to send.
          dest (int): Destination rank.
      """
      # serialize the message
      msg = pickle.dumps(msg)
      # construct a tensor to send
      msg = torch.ByteTensor(torch.ByteStorage.from_buffer(msg)).cuda()
  
      # Send meta and message
      length_tensor = torch.tensor([len(msg)], dtype=torch.long).cuda()
      dist.send(length_tensor, dst=dest)
      dist.send(msg, dst=dest)
  
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 7 for calling a global function with example usage: send_obj(msg, dest) without return types