code: def _list_forward(
      model: Model[SeqT, SeqT], Xs: ListXd, is_train: bool
  ) -> Tuple[ListXd, Callable]:
      layer: Model[ArrayXd, ArrayXd] = model.layers[0]
      pad = model.attrs["pad"]
      lengths = NUMPY_OPS.asarray1i([len(seq) for seq in Xs])
      Xf = layer.ops.flatten(Xs, pad=pad)
      Yf, get_dXf = layer(Xf, is_train)
  
      def backprop(dYs: ListXd) -> ListXd:
          dYf = layer.ops.flatten(dYs, pad=pad)
          dXf = get_dXf(dYf)
          return layer.ops.unflatten(dXf, lengths, pad=pad)
  
      return layer.ops.unflatten(Yf, lengths, pad=pad), backprop
  
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 5 for calling a global function with example usage: _list_forward(model, Xs, is_train) and returns: layer,  backprop, layer