code: def dgmg_message_weight_init(m):
      """
      This is similar as the function above where we initialize linear layers from a normal distribution with std
      1./10 as suggested by the author. This should only be used for the message passing functions, i.e. fe's in the
      paper.
      """
  
      def _weight_init(m):
          if isinstance(m, nn.Linear):
              init.normal_(m.weight.data, std=1.0 / 10)
              init.normal_(m.bias.data, std=1.0 / 10)
          else:
              raise ValueError(
                  "Expected the input to be of type nn.Linear!"
              )
  
      if isinstance(m, nn.ModuleList):
          for layer in m:
              layer.apply(_weight_init)
      else:
          m.apply(_weight_init)
  
file_path: dgl/examples/pytorch/dgmg/utils.py
imports: import datetime
  import os
  import random
  from pprint import pprint
  import matplotlib.pyplot
  import torch
  import torch.backends.cudnn
  import torch.nn
  import torch.nn.init
label_desc: Use image node_id 7 for calling a global function with example usage: dgmg_message_weight_init(m) without return types