code: def init_layer(
      m: nn.Module,
      method: str,
      init_depth: tp.Optional[int] = None,
      zero_bias_init: bool = False,
  ):
      """Wrapper around ``get_init_fn`` for proper initialization of LM modules.
  
      Args:
          m (nn.Module): Module to initialize.
          method (str): Method name for the init function.
          init_depth (int, optional): Optional init depth value used to rescale
              the standard deviation if defined.
          zero_bias_init (bool): Whether to initialize the bias to 0 or not.
      """
      if isinstance(m, nn.Linear):
          init_fn = get_init_fn(
              method, m.in_features, init_depth=init_depth
          )
          if (
              m.weight.device.type == "cpu"
              and m.weight.dtype == torch.float16
          ):
              weight = m.weight.float()
              init_fn(weight)
              m.weight.data[:] = weight.half()
          else:
              init_fn(m.weight)
          if zero_bias_init and m.bias is not None:
              nn.init.constant_(m.bias, 0)
      elif isinstance(m, nn.Embedding):
          init_fn = get_init_fn(
              method, m.embedding_dim, init_depth=None
          )
          if (
              m.weight.device.type == "cpu"
              and m.weight.dtype == torch.float16
          ):
              weight = m.weight.float()
              init_fn(weight)
              m.weight.data[:] = weight.half()
          else:
              init_fn(m.weight)
  
imports: from dataclasses import dataclass
  from functools import partial
  import logging
  import math
  import typing
  import torch
  from torch import nn
  from ..utils import utils
  from ..modules.streaming import StreamingModule, State
  from ..modules.transformer import StreamingTransformer, create_norm_fn
  from ..modules.conditioners import ConditionFuser, ClassifierFreeGuidanceDropout, AttributeDropout, ConditioningProvider, ConditioningAttributes, ConditionType
  from ..modules.codebooks_patterns import CodebooksPatternProvider
  from ..modules.activations import get_activation_fn
label_desc: Use image node_id 2 for calling a global function with example usage: init_layer(m, method, init_depth, zero_bias_init) without return types