code: def __init__(self, *, bias=0, bias_prob=None, layer=None):
      self.wholemodule = False
      if not isinstance(bias, (int, float)):
          raise TypeError(
              f"bias must be a number, but got a {type(bias)}"
          )
  
      if bias_prob is not None:
          if not isinstance(bias_prob, float):
              raise TypeError(
                  f"bias_prob type must be float, \
                      but got {type(bias_prob)}"
              )
  
      if layer is not None:
          if not isinstance(layer, (str, list)):
              raise TypeError(
                  f"layer must be a str or a list of str, \
                      but got a {type(layer)}"
              )
      else:
          layer = []
  
      if bias_prob is not None:
          self.bias = bias_init_with_prob(bias_prob)
      else:
          self.bias = bias
      self.layer = [layer] if isinstance(layer, str) else layer
  
imports: import copy
  import math
  import warnings
  import numpy
  import torch
  import torch.nn
  from torch import Tensor
  from annotator.uniformer.mmcv.utils import Registry, build_from_cfg, get_logger, print_log
label_desc: Use image node_id 1 to create a new BaseInit object from inherited base classes: object with example: obj = BaseInit()