code: def init(
      model: Model[InT, OutT],
      X: Optional[InT] = None,
      Y: Optional[OutT] = None,
  ) -> None:
      layer = model.layers[0]
      layer.initialize(X=X, Y=Y)
      if layer.has_dim("nI"):
          model.set_dim("nI", layer.get_dim("nI"))  # pragma: no cover
      if layer.has_dim("nO"):
          model.set_dim("nO", layer.get_dim("nO"))
  
imports: from typing import Callable, Optional, Tuple
  import numpy
  from ..config import registry
  from ..model import Model
  from ..types import Floats2d, Ints2d
label_desc: Use image node_id 3 for calling a global function with example usage: init(model, X, Y) without return types