code: def variance_scaling_trunc(tensor, gain=1.0):
      fan_in, _ = _calculate_fan_in_and_fan_out(tensor)
      gain /= max(1.0, fan_in)
      std = math.sqrt(gain) / 0.87962566103423978
      return trunc_normal_(tensor, 0.0, std)
  
imports: import math
  from typing import Tuple, Union
  import torch
  import torch.nn
  from mmcv.cnn.bricks import Swish, build_norm_layer
  from torch.nn import functional
  from torch.nn.init import _calculate_fan_in_and_fan_out, trunc_normal_
  from mmdet.registry import MODELS
  from mmdet.utils import OptConfigType
label_desc: Use image node_id 1 for calling a global function with example usage: variance_scaling_trunc(tensor, gain) and returns: trunc_normal_