code: def forward(
      model: Model[SeqT, SeqT], Xseq: SeqT, is_train: bool
  ) -> Tuple[SeqT, Callable]:
      if isinstance(Xseq, Ragged):
          return cast(
              Tuple[SeqT, Callable],
              _ragged_forward(model, Xseq, is_train),
          )
      elif isinstance(Xseq, Padded):
          return cast(
              Tuple[SeqT, Callable],
              _padded_forward(model, Xseq, is_train),
          )
      elif not isinstance(Xseq, (list, tuple)):
          return model.layers[0](Xseq, is_train)
      else:
          return cast(
              Tuple[SeqT, Callable],
              _list_forward(model, Xseq, is_train),
          )
  
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 2 for calling a global function with example usage: forward(model, Xseq, is_train) and returns: cast, cast, model, cast