code: def forward(
      model: Model[InT, OutT], X: InT, is_train: bool
  ) -> Tuple[OutT, Callable]:
      """Return the output of the wrapped TensorFlow model for the given input,
      along with a callback to handle the backward pass.
      """
      convert_inputs = model.attrs["convert_inputs"]
      convert_outputs = model.attrs["convert_outputs"]
      tensorflow_model = model.shims[0]
      X_tensorflow, get_dX = convert_inputs(model, X, is_train)
      if is_train:
          Y_tensorflow, tensorflow_backprop = tensorflow_model(
              X_tensorflow, is_train
          )
      else:
          Y_tensorflow = tensorflow_model(X_tensorflow, is_train)
      Y, get_dY_tensorflow = convert_outputs(
          model, Y_tensorflow, is_train
      )
  
      def backprop(dY: OutT) -> InT:
          dY_tensorflow = get_dY_tensorflow(dY)
          dX_tensorflow = tensorflow_backprop(dY_tensorflow)
          return get_dX(dX_tensorflow)
  
      return Y, backprop
  
file_path: thinc/thinc/layers/tensorflowwrapper.py
imports: from typing import Any, Callable, Dict, Optional, Tuple, Type, TypeVar
  import srsly
  from ..compat import tensorflow
  from ..model import Model
  from ..shims import TensorFlowShim, keras_model_fns, maybe_handshake_model
  from ..types import ArgsKwargs, ArrayXd
  from ..util import assert_tensorflow_installed, convert_recursive, is_tensorflow_array, is_xp_array, tensorflow2xp, xp2tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: forward(model, X, is_train) and returns: Y,  backprop, get_dX