code: def init(
      model: Model[InT, InT],
      X: Optional[InT] = None,
      Y: Optional[InT] = None,
  ) -> None:
      if X is not None:
          X_width = get_width(X)
          model.set_dim("nI", X_width)
          model.set_dim("nO", X_width)
      elif Y is not None:
          Y_width = get_width(Y)
          model.set_dim("nI", Y_width)
          model.set_dim("nO", Y_width)
      nI = model.get_dim("nI")
      if not model.has_dim("nO"):
          model.set_dim("nO", nI)
      model.set_param("G", model.ops.alloc1f(nI) + 1)
      model.set_param("b", model.ops.alloc1f(nI))
      assert model.get_dim("nO") is not None
  
file_path: thinc/thinc/layers/layernorm.py
imports: from typing import Callable, Optional, Tuple, cast
  from ..backends import Ops
  from ..config import registry
  from ..model import Model
  from ..types import Floats2d
  from ..util import get_width
label_desc: Use image node_id 3 for calling a global function with example usage: init(model, X, Y) without return types