code: def _tuple_forward(
      layer: Model[Padded, Padded], X: PaddedData, is_train: bool
  ) -> Tuple[PaddedData, Callable]:
      Yp, get_dXp = layer(Padded(*X), is_train)
  
      def backprop(dY):
          dXp = get_dXp(Padded(*dY))
          return (dXp.data, dXp.size_at_t, dXp.lengths, dXp.indices)
  
      return (
          cast(Floats3d, Yp.data),
          Yp.size_at_t,
          Yp.lengths,
          Yp.indices,
      ), backprop
  
file_path: thinc/thinc/layers/with_padded.py
imports: from typing import Callable, List, Optional, Tuple, TypeVar, Union, cast
  from ..config import registry
  from ..model import Model
  from ..types import Array2d, Floats3d, Ints1d, List2d, Padded, Ragged
  from ..util import is_xp_array
label_desc: Use image node_id 7 for calling a global function with example usage: _tuple_forward(layer, X, is_train) and returns: cast,  Yp,  Yp,  Yp,  backprop, dXp,  dXp,  dXp,  dXp