code: def constant_init(module, val, bias=0):
      # Code adapted from https://github.com/open-mmlab/mmcv/blob/master/mmcv/cnn/utils/weight_init.py
      if hasattr(module, "weight") and module.weight is not None:
          nn.init.constant_(module.weight, val)
      if hasattr(module, "bias") and module.bias is not None:
          nn.init.constant_(module.bias, bias)
  
imports: import os
  import sys
  import time
  import functools
  import logging
  from contextlib import contextmanager
  from functools import wraps
  import numpy
  import torch.nn
  import torch
label_desc: Use image node_id 9 for calling a global function with example usage: constant_init(module, val, bias) without return types