code: def setup_class(cls):
      # 不初始化的话从第二个测试例开始会因为环境变量报错。
      torch_model = TorchNormalModel_Classification_1(1, 1)
      torch_opt = torch.optim.Adam(
          params=torch_model.parameters(), lr=0.01
      )
      device = [torch.device(i) for i in [0, 1]]
      driver = DeepSpeedDriver(
          model=torch_model,
          parallel_device=device,
      )
      driver.set_optimizers(torch_opt)
      driver.setup()
  
      return driver
  
file_path: fastNLP/tests/core/controllers/test_trainer_deepspeed.py
imports: import pytest
  from dataclasses import dataclass
  from fastNLP.core.controllers.trainer import Trainer
  from fastNLP.core.metrics.accuracy import Accuracy
  from fastNLP.core.callbacks.progress_callback import RichCallback
  from fastNLP.core.drivers.torch_driver import DeepSpeedDriver
  from fastNLP.core.drivers.torch_driver.utils import _create_default_config
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from tests.helpers.models.torch_model import TorchNormalModel_Classification_1
  from tests.helpers.datasets.torch_data import TorchArgMaxDataset
  from tests.helpers.utils import magic_argv_env_context
label_desc: Use image node_id 1 for calling the TestTrainer obj's underlying member method code with example usage: obj.setup_class(cls) and returns: driver