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: 进行初始化设置的函数，根据传入的设备找到分布式训练使用的端口号
docstr_tok: ["\u8fdb\u884c\u521d\u59cb\u5316\u8bbe\u7f6e\u7684\u51fd\u6570\uff0c\u6839\u636e\u4f20\u5165\u7684\u8bbe\u5907\u627e\u5230\u5206\u5e03\u5f0f\u8bad\u7ec3\u4f7f\u7528\u7684\u7aef\u53e3\u53f7"]
code: def setup(self):
      """
      进行初始化设置的函数，根据传入的设备找到分布式训练使用的端口号
      """
      self.set_endpoints()
      self.sub_trainers = self.get_process_info()
  
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 2 for calling the FleetLauncher obj's underlying member method code with example usage: obj.setup() without return types