code: def init_weights(
      model,
      fc_init_std=0.01,
      zero_init_final_bn=True,
      zero_init_final_conv=False,
  ):
      """
      Performs ResNet style weight initialization.
      Args:
          fc_init_std (float): the expected standard deviation for fc layer.
          zero_init_final_bn (bool): if True, zero initialize the final bn for
              every bottleneck.
      """
      for m in model.modules():
          if isinstance(m, nn.Conv3d):
              # Note that there is no bias due to BN
              if hasattr(m, "final_conv") and zero_init_final_conv:
                  m.weight.data.zero_()
              else:
                  """
                  Follow the initialization method proposed in:
                  {He, Kaiming, et al.
                  "Delving deep into rectifiers: Surpassing human-level
                  performance on imagenet classification."
                  arXiv preprint arXiv:1502.01852 (2015)}
                  """
                  c2_msra_fill(m)
  
          elif isinstance(
              m, (nn.BatchNorm3d, nn.BatchNorm2d, nn.BatchNorm1d)
          ):
              if (
                  hasattr(m, "transform_final_bn")
                  and m.transform_final_bn
                  and zero_init_final_bn
              ):
                  batchnorm_weight = 0.0
              else:
                  batchnorm_weight = 1.0
              if m.weight is not None:
                  m.weight.data.fill_(batchnorm_weight)
              if m.bias is not None:
                  m.bias.data.zero_()
          if isinstance(m, nn.Linear):
              if hasattr(m, "xavier_init") and m.xavier_init:
                  c2_xavier_fill(m)
              else:
                  m.weight.data.normal_(mean=0.0, std=fc_init_std)
              if m.bias is not None:
                  m.bias.data.zero_()
  
label_desc: Use image node_id 1 for calling a global function with example usage: init_weights(model, fc_init_std, zero_init_final_bn, zero_init_final_conv) without return types