code: def _padded_forward(
      layer: Model[List2d, List2d], Xp: Padded, is_train: bool
  ) -> Tuple[Padded, Callable]:
      # Assign these to locals, to keep code a bit shorter.
      padded2list = layer.ops.padded2list
      list2padded = layer.ops.list2padded
      # It's worth being a bit careful about memory here, as the activations
      # are potentially large on GPU. So we make nested function calls instead
      # of assigning to temporaries where possible, so memory can be reclaimed
      # sooner.
      Ys, get_dXs = layer(padded2list(Xp), is_train)
  
      def backprop(dYp):
          return list2padded(get_dXs(padded2list(dYp)))
  
      return list2padded(Ys), backprop
  
file_path: thinc/thinc/layers/with_list.py
imports: from typing import Callable, List, Optional, Tuple, TypeVar, Union, cast
  from ..config import registry
  from ..model import Model
  from ..types import Array2d, Floats2d, Ints2d, List2d, Padded, Ragged
label_desc: Use image node_id 6 for calling a global function with example usage: _padded_forward(layer, Xp, is_train) and returns: list2padded,  backprop, list2padded