class_docstr: Plugin for PyTorch DDP.
  
  ```python
  from colossalai.booster import Booster
  from colossalai.booster.plugin import TorchDDPPlugin
  
  model, train_dataset, optimizer, criterion = ...
  plugin = TorchDDPPlugin()
  
  train_dataloader = plugin.prepare_dataloader(train_dataset, batch_size=8)
  booster = Booster(plugin=plugin)
  model, optimizer, train_dataloader, criterion = booster.boost(model, optimizer, train_dataloader, criterion)
  ```
  
  Args:
      broadcast_buffers (bool, optional): Whether to broadcast buffers in the beginning of training. Defaults to True.
      bucket_cap_mb (int, optional): The bucket size in MB. Defaults to 25.
      find_unused_parameters (bool, optional): Whether to find unused parameters. Defaults to False.
      check_reduction (bool, optional): Whether to check reduction. Defaults to False.
      gradient_as_bucket_view (bool, optional): Whether to use gradient as bucket view. Defaults to False.
      static_graph (bool, optional): Whether to use static graph. Defaults to False.
code: def configure(
      self,
      model: nn.Module,
      optimizer: Optional[Optimizer] = None,
      criterion: Optional[Callable] = None,
      dataloader: Optional[DataLoader] = None,
      lr_scheduler: Optional[LRScheduler] = None,
  ) -> Tuple[
      nn.Module, OptimizerWrapper, Callable, DataLoader, LRScheduler
  ]:
      # cast model to cuda
      model = model.cuda()
  
      # convert model to sync bn
      model = nn.SyncBatchNorm.convert_sync_batchnorm(model, None)
  
      # wrap the model with PyTorch DDP
      model = TorchDDPModel(model, **self.ddp_kwargs)
  
      if optimizer is not None and not isinstance(
          optimizer, OptimizerWrapper
      ):
          optimizer = OptimizerWrapper(optimizer)
  
      return model, optimizer, criterion, dataloader, lr_scheduler
  
imports: from typing import Callable, Iterator, List, Optional, Tuple
  import torch.nn
  from torch.nn.parallel import DistributedDataParallel
  from torch.optim import Optimizer
  from torch.optim.lr_scheduler import _LRScheduler
  from torch.utils.data import DataLoader
  from colossalai.checkpoint_io import CheckpointIO, GeneralCheckpointIO
  from colossalai.cluster import DistCoordinator
  from colossalai.interface import ModelWrapper, OptimizerWrapper
  from .dp_plugin_base import DPPluginBase
label_desc: Use image node_id 7 for calling the TorchDDPPlugin obj's underlying member method code with example usage: obj.configure(model, optimizer, criterion, dataloader, lr_scheduler) and returns: model,  optimizer,  criterion,  dataloader,  lr_scheduler