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),
          )
      return
  
file_path: thinc/thinc/layers/with_array2d.py
imports: from typing import Callable, List, Optional, Tuple, TypeVar, Union, cast
  from ..backends import NumpyOps
  from ..config import registry
  from ..model import Model
  from ..types import Array2d, Floats2d, List2d, 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