code: def forward(
      model: Model[InT, OutT], X: InT, is_train: bool
  ) -> Tuple[OutT, Callable]:
      Ys, callbacks = zip(
          *[layer(X, is_train=is_train) for layer in model.layers]
      )
      if isinstance(Ys[0], list):
          data_l, backprop = _list_forward(
              model, X, Ys, callbacks, is_train
          )
          return cast(OutT, data_l), backprop
      elif isinstance(Ys[0], Ragged):
          data_r, backprop = _ragged_forward(
              model, X, Ys, callbacks, is_train
          )
          return cast(OutT, data_r), backprop
      else:
          data_a, backprop = _array_forward(
              model, X, Ys, callbacks, is_train
          )
          return cast(OutT, data_a), backprop
  
file_path: thinc/thinc/layers/concatenate.py
imports: from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, TypeVar, Union, cast
  from ..backends import NumpyOps
  from ..config import registry
  from ..model import Model
  from ..types import Array2d, Ragged, XY_XY_OutT
  from ..util import get_width
  from .noop import noop
label_desc: Use image node_id 2 for calling a global function with example usage: forward(model, X, is_train) and returns: cast,  backprop, cast,  backprop, cast,  backprop