code: def init_weights(module, initialization):
      if type(module) is torch.nn.Linear:
          if initialization == "orthogonal":
              torch.nn.init.orthogonal_(module.weight)
          elif initialization == "he_uniform":
              torch.nn.init.kaiming_uniform_(module.weight)
          elif initialization == "he_normal":
              torch.nn.init.kaiming_normal_(module.weight)
          elif initialization == "glorot_uniform":
              torch.nn.init.xavier_uniform_(module.weight)
          elif initialization == "glorot_normal":
              torch.nn.init.xavier_normal_(module.weight)
          elif initialization == "lecun_normal":
              pass  # torch.nn.init.normal_(module.weight, 0.0, std=1/np.sqrt(module.weight.numel()))
          else:
              assert 1 < 0, f"Initialization {initialization} not found"
  
imports: from functools import partial
  from typing import List, Tuple
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: init_weights(module, initialization) without return types