class_docstr: 参考 :class:`fastNLP.core.drivers.torch_driver.utils._DDPWrappingModel` ， **PaddlePaddle** 的分布式训练也需要用 :class:`paddle.nn.DataParallel` 进行包装，采用和
  **pytorch** 相似的处理方式
class_docstr_tok: ["\u53c2\u8003",":","class",":","`","fastNLP.core.drivers.torch_driver.utils._DDPWrappingModel","`","\uff0c","*","*","PaddlePaddle","*","*","\u7684\u5206\u5e03\u5f0f\u8bad\u7ec3\u4e5f\u9700\u8981\u7528",":","class",":","`","paddle.nn.DataParallel","`","\u8fdb\u884c\u5305\u88c5\uff0c\u91c7\u7528\u548c","*","*","pytorch","*","*","\u76f8\u4f3c\u7684\u5904\u7406\u65b9\u5f0f"]
code: def forward(self, batch, **kwargs) -> Dict:
      fn = kwargs.pop("fastnlp_fn")
      signature_fn = kwargs.pop("fastnlp_signature_fn")
      wo_auto_param_call = kwargs.pop("wo_auto_param_call")
  
      if isinstance(batch, Dict) and not wo_auto_param_call:
          return auto_param_call(fn, batch, signature_fn=signature_fn)
      else:
          return fn(batch)
  
imports: import socket
  import os
  import struct
  import random
  import inspect
  import numpy
  from copy import deepcopy
  from contextlib import ExitStack, closing
  from typing import Dict, Optional
  from fastNLP.envs.imports import _NEED_IMPORT_PADDLE
  from fastNLP.envs.utils import get_global_seed
  from fastNLP.envs import get_global_rank, FASTNLP_BACKEND_LAUNCH, FASTNLP_GLOBAL_SEED
  from fastNLP.core.samplers import ReproducibleBatchSampler
  from fastNLP.core.utils import auto_param_call, paddle_to
  from fastNLP.core.log import logger
label_desc: Use image node_id 2 for calling the _FleetWrappingModel obj's underlying member method code with example usage: obj.forward(batch) and returns: auto_param_call, fn