code: def forward(
      model: Model[InT, OutT], Xs: InT, is_train: bool
  ) -> Tuple[OutT, Callable]:
      Yp = model.ops.list2padded(Xs)
  
      def backprop(dYp: OutT) -> InT:
          return cast(InT, model.ops.padded2list(dYp))
  
      return Yp, backprop
  
imports: from typing import Callable, Tuple, TypeVar, cast
  from ..config import registry
  from ..model import Model
  from ..types import List2d, Padded
label_desc: Use image node_id 2 for calling a global function with example usage: forward(model, Xs, is_train) and returns: Yp,  backprop, cast