code: def forward(model: Model[InT, OutT], X: InT, is_train: bool):
      layer = model.layers[0]
      Y, callback = layer(X, is_train=is_train)
  
      def backprop(dY: OutT) -> InT:
          return callback(dY)
  
      return Y, backprop
  
file_path: thinc/thinc/layers/resizable.py
imports: from typing import Callable, Optional, TypeVar
  from ..config import registry
  from ..model import Model
  from ..types import Floats2d
label_desc: Use image node_id 2 for calling a global function with example usage: forward(model, X, is_train) and returns: Y,  backprop, callback