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"]
code: def __init__(
      self, devices: List[str], output_from_new_proc: str = "only_error"
  ):
      self.devices = [get_paddle_device_id(g) for g in devices]
      self.output_from_new_proc = output_from_new_proc
  
      self.setup()
  
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 1 to create a new FleetLauncher object  with example: obj = FleetLauncher(devices, output_from_new_proc)