code: def model_and_optimizers(request):
      trainer_params = TrainerParameters()
  
      trainer_params.model = TorchNormalModel_Classification_1(
          num_labels=ArgMaxDatasetConfig.num_labels,
          feature_dimension=ArgMaxDatasetConfig.feature_dimension,
      )
      trainer_params.optimizers = SGD(
          trainer_params.model.parameters(), lr=0.001
      )
      dataset = TorchArgMaxDataset(
          feature_dimension=ArgMaxDatasetConfig.feature_dimension,
          data_num=ArgMaxDatasetConfig.data_num,
          seed=ArgMaxDatasetConfig.seed,
      )
      _dataloader = DataLoader(
          dataset=dataset,
          batch_size=ArgMaxDatasetConfig.batch_size,
          shuffle=True,
      )
      trainer_params.train_dataloader = _dataloader
      trainer_params.evaluate_dataloaders = _dataloader
      trainer_params.metrics = {"acc": Accuracy()}
  
      return trainer_params
  
file_path: fastNLP/tests/core/drivers/torch_driver/test_fsdp.py
imports: import os
  from dataclasses import dataclass
  from typing import Any
  from pathlib import Path
  import re
  import pytest
  from fastNLP.core.controllers.trainer import Trainer
  from fastNLP.core.callbacks import CheckpointCallback
  from tests.helpers.models.torch_model import TorchNormalModel_Classification_1
  from tests.helpers.datasets.torch_data import TorchNormalDataset_Classification, TorchArgMaxDataset
  from tests.helpers.callbacks.helper_callbacks import RecordLossCallback
  from tests.helpers.utils import magic_argv_env_context
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH, _TORCH_GREATER_EQUAL_1_12
  from fastNLP.envs import FASTNLP_LAUNCH_TIME, rank_zero_rm
label_desc: Use image node_id 1 for calling a global function with example usage: model_and_optimizers(request) and returns: trainer_params