code: def send_recv_object(
      obj, src, cur_rank, device, group=None, use_calc_stream=True
  ):
      # src rank send to all other ranks
      size = paddle_move_data_to_device(paddle.to_tensor([0]), device)
  
      if cur_rank == src:
          world_size = dist.get_world_size()
          tensor, size = _object_to_tensor(obj)
          tensor = tensor.to(device)
          size = size.to(device)
  
          # 首先同步 obj 的 size 的信息；
          dist.broadcast(size, src, group=group)
          for subrank in range(world_size):
              if subrank != src:
                  dist.send(
                      tensor=tensor,
                      dst=subrank,
                      group=group,
                      use_calc_stream=use_calc_stream,
                  )
      else:
          dist.broadcast(size, src, group=group)
          tensor = paddle_move_data_to_device(
              paddle.to_tensor([0] * size), device
          )
          dist.recv(
              tensor=tensor,
              src=src,
              group=group,
              use_calc_stream=use_calc_stream,
          )
  
      return _tensor_to_object(tensor.cpu(), size)
  
file_path: fastNLP/fastNLP/core/drivers/paddle_driver/dist_utils.py
imports: import io
  import pickle
  import os
  from typing import Any, List
  import numpy
  from fastNLP.envs.imports import _NEED_IMPORT_PADDLE
  from fastNLP.envs.env import FASTNLP_NO_SYNC
  from fastNLP.core.utils import paddle_move_data_to_device
label_desc: Use image node_id 7 for calling a global function with example usage: send_recv_object(obj, src, cur_rank, device, group, use_calc_stream) and returns: _tensor_to_object