class_docstr: 复原了 paddle 的 launch_collective 函数，将其简化后集成到一个类里
  仅支持每个机器单卡的情况。
class_docstr_tok: ["\u590d\u539f\u4e86","paddle","\u7684","launch_collective","\u51fd\u6570\uff0c\u5c06\u5176\u7b80\u5316\u540e\u96c6\u6210\u5230\u4e00\u4e2a\u7c7b\u91cc","\u4ec5\u652f\u6301\u6bcf\u4e2a\u673a\u5668\u5355\u5361\u7684\u60c5\u51b5\u3002"]
docstr: 获取各个训练进程的设备、rank 和端口信息，参考 PaddlePaddle 的 `get_cluster` 函数。
docstr_tok: ["\u83b7\u53d6\u5404\u4e2a\u8bad\u7ec3\u8fdb\u7a0b\u7684\u8bbe\u5907\u3001rank","\u548c\u7aef\u53e3\u4fe1\u606f\uff0c\u53c2\u8003","PaddlePaddle","\u7684","`","get_cluster","`","\u51fd\u6570\u3002"]
code: def get_process_info(self):
      """
      获取各个训练进程的设备、rank 和端口信息，参考 PaddlePaddle 的 `get_cluster` 函数。
      """
      sub_trainers = []
      assert len(self.endpoints) >= len(
          self.devices
      ), "current trainer_endpoints size should be greater equal than acclerators size."
  
      for i in range(len(self.devices)):
          sub_trainer = SubTrainer(f"{self.endpoints[i]}", i)
          if isinstance(self.devices[i], (list, tuple)):
              sub_trainer.devices.extend(self.devices[i])
          else:
              sub_trainer.devices.append(self.devices[i])
  
          sub_trainers.append(sub_trainer)
  
      return sub_trainers
  
imports: import os
  import sys
  import __main__
  import tempfile
  import copy
  from typing import List
  from fastNLP.core.drivers.utils import distributed_open_proc
  from fastNLP.envs.env import FASTNLP_DISTRIBUTED_CHECK, FASTNLP_LOG_LEVEL, FASTNLP_GLOBAL_SEED, FASTNLP_GLOBAL_RANK
  from fastNLP.core.utils import get_paddle_device_id
  from .utils import find_free_ports
label_desc: Use image node_id 7 for calling the FleetLauncher obj's underlying member method code with example usage: obj.get_process_info() and returns: sub_trainers