code: def init(
      model: Model[SeqT, SeqT],
      X: Optional[SeqT] = None,
      Y: Optional[SeqT] = None,
  ) -> None:
      layer: Model[ArrayXd, ArrayXd] = model.layers[0]
      layer.initialize(
          X=_get_array(model, X) if X is not None else X,
          Y=_get_array(model, Y) if Y is not None else Y,
      )
      for dim_name in layer.dim_names:
          value = layer.maybe_get_dim(dim_name)
          if value is not None:
              model.set_dim(dim_name, value)
  
file_path: thinc/thinc/layers/with_array.py
imports: from typing import Callable, Optional, Tuple, TypeVar, Union, cast
  from ..backends import NumpyOps
  from ..config import registry
  from ..model import Model
  from ..types import Array3d, ArrayXd, ListXd, Padded, Ragged
label_desc: Use image node_id 3 for calling a global function with example usage: init(model, X, Y) without return types