code: def _dropconnect_mapping_fn(
      module: torch.nn.Module, layers, weight_dropout
  ) -> Optional[nn.Module]:
      new_module: Optional[nn.Module] = None
      for layer in layers:
          if isinstance(module, getattr(torch.nn, layer)):
              new_module = get_weight_drop_module(
                  layer, weight_dropout, **module.__dict__
              )
              break
      if isinstance(module, nn.Dropout):
          module._baal_p: float = module.p  # type: ignore
          module.p = 0.0
      return new_module
  
imports: import copy
  import warnings
  from typing import List, Optional, cast, Dict
  from baal.bayesian.common import replace_layers_in_module, _patching_wrapper, BayesianModule
  import torch
  from torch import nn
  from packaging.version import parse
label_desc: Use image node_id 4 for calling a global function with example usage: _dropconnect_mapping_fn(module, layers, weight_dropout) and returns: new_module