code: def _initialize_layers(activation, initialization, layers):
      if type(layers) is nn.Sequential:
          for layer in layers:
              if hasattr(layer, "weight"):
                  _initialize_layers(activation, initialization, layer)
      else:
          if activation == "ReLU":
              nonlinearity = "relu"
          elif activation == "LeakyReLU":
              nonlinearity = "leaky_relu"
          else:
              if initialization == "kaiming":
                  logger.warning(
                      "Kaiming initialization is only recommended for ReLU and"
                      " LeakyReLU."
                  )
                  nonlinearity = "leaky_relu"
              else:
                  nonlinearity = "relu"
  
          if initialization == "kaiming":
              nn.init.kaiming_normal_(
                  layers.weight, nonlinearity=nonlinearity
              )
          elif initialization == "xavier":
              nn.init.xavier_normal_(
                  layers.weight,
                  gain=(
                      nn.init.calculate_gain(nonlinearity)
                      if activation in ["ReLU", "LeakyReLU"]
                      else 1
                  ),
              )
          elif initialization == "random":
              nn.init.normal_(layers.weight)
  
file_path: pytorch_tabular/src/pytorch_tabular/utils/nn_utils.py
imports: import torch
  import torch.nn
  from .logger import get_logger
label_desc: Use image node_id 1 for calling a global function with example usage: _initialize_layers(activation, initialization, layers) without return types