code: def unfreeze_batch_norm_2d(module):
      """
      Converts all `FrozenBatchNorm2d` layers of provided module into `BatchNorm2d`. If `module` is itself and instance
      of `FrozenBatchNorm2d`, it is converted into `BatchNorm2d` and returned. Otherwise, the module is walked
      recursively and submodules are converted in place.
  
      Args:
          module (torch.nn.Module): Any PyTorch module.
  
      Returns:
          torch.nn.Module: Resulting module
  
      Inspired by https://github.com/pytorch/pytorch/blob/a5895f85be0f10212791145bfedc0261d364f103/torch/nn/modules/batchnorm.py#L762
      """
      res = module
      if isinstance(module, FrozenBatchNormAct2d):
          res = BatchNormAct2d(module.num_features)
          if module.affine:
              res.weight.data = module.weight.data.clone().detach()
              res.bias.data = module.bias.data.clone().detach()
          res.running_mean.data = module.running_mean.data
          res.running_var.data = module.running_var.data
          res.eps = module.eps
          res.drop = module.drop
          res.act = module.act
      elif isinstance(module, FrozenBatchNorm2d):
          res = torch.nn.BatchNorm2d(module.num_features)
          if module.affine:
              res.weight.data = module.weight.data.clone().detach()
              res.bias.data = module.bias.data.clone().detach()
          res.running_mean.data = module.running_mean.data
          res.running_var.data = module.running_var.data
          res.eps = module.eps
      else:
          for name, child in module.named_children():
              new_child = unfreeze_batch_norm_2d(child)
              if new_child is not child:
                  res.add_module(name, new_child)
      return res
  
imports: from typing import Union, List, Optional, Any
  import torch
  from torch import nn
  from torch.nn import functional
  from torchvision.ops.misc import FrozenBatchNorm2d
  from .create_act import get_act_layer
  from .fast_norm import is_fast_norm, fast_group_norm, fast_layer_norm
  from .trace_utils import _assert
label_desc: Use image node_id 4 for calling a global function with example usage: unfreeze_batch_norm_2d(module) and returns: res