code: def apply(model_path):
      """Run inference from a training model checkpoint."""
      pred_config = PredictConfig(
          session_init=SmartInit(model_path),
          model=Model(),
          input_names=["input_img"],
          output_names=["prediction_img"],
      )
  
      pred = OfflinePredictor(pred_config)
      img = cv2.imread("lena.png")
      prediction = pred([img])[0]
      cv2.imwrite("applied_default.jpg", prediction[0])
  
imports: import argparse
  import cv2
  from tensorpack import tfv1
  from tensorpack import *
  from tensorpack.tfutils.export import ModelExporter
label_desc: Use image node_id 4 for calling a global function with example usage: apply(model_path) without return types