code: def apply_inference_graph(model_path):
      """Run inference from a different graph, which receives encoded images buffers."""
      pred_config = PredictConfig(
          session_init=SmartInit(model_path),
          model=InferenceOnlyModel(),
          input_names=["input_img_bytes"],
          output_names=["prediction_img_bytes"],
      )
  
      pred = OfflinePredictor(pred_config)
      buf = open("lena.png", "rb").read()
      prediction = pred([buf])[0]
      with open("applied_inference_graph.png", "wb") as f:
          f.write(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 5 for calling a global function with example usage: apply_inference_graph(model_path) without return types