class_docstr: A `DdpAccelerator` is a generalization of PyTorch's `DistributedDataParallel` class.
  
  This is primarly used within the :class:`allennlp.training.trainer.GradientDescentTrainer` to allow
  for different DDP implementations, such as FairScale's [`FullyShardedDataParallel`]
  (https://fairscale.readthedocs.io/en/latest/api/nn/fsdp.html).
  
  In a typical AllenNLP configuration file, `local_rank`, `world_size`, and `cuda_device`
  should not be specified.
  
  !!! Warning
      This API is experimental and may change in the future.
docstr: Wrap an individual module. By default this just returns the module,
  but some subclass implementations such as
  :class:`allennlp.nn.parallel.fairscale_fsdp_accelerator.FairScaleFsdpAccelerator` do more.
docstr_tok: ["Wrap","an","individual","module",".","By","default","this","just","returns","the","module",",","but","some","subclass","implementations","such","as",":","class",":","`","allennlp.nn.parallel.fairscale_fsdp_accelerator.FairScaleFsdpAccelerator","`","do","more","."]
code: def wrap_module(self, module: torch.nn.Module) -> torch.nn.Module:
      """
      Wrap an individual module. By default this just returns the module,
      but some subclass implementations such as
      :class:`allennlp.nn.parallel.fairscale_fsdp_accelerator.FairScaleFsdpAccelerator` do more.
      """
      return module
  
imports: import os
  from typing import Union, Tuple, OrderedDict, Dict, NamedTuple, List, Optional, Any, Sequence, TYPE_CHECKING
  import torch
  import torch.distributed
  from torch.cuda import amp
  from torch.nn.utils import clip_grad_norm_
  from allennlp.common import Registrable
  from allennlp.common.util import int_to_device
  from allennlp.nn.parallel.sharded_module_mixin import ShardedModuleMixin
label_desc: Use image node_id 3 for calling the DdpAccelerator obj's underlying member method code with example usage: obj.wrap_module(module) and returns: module