code: def optimize_pb_model_command(input_pb_file, output_pb_file):
      try:
          import tensorflow as tf
          from tensorflow.python.platform import gfile
          from nnabla.utils.converter.tensorflow.common import (
              OptimizePb,
          )
      except ImportError:
          raise ImportError(
              'nnabla_converter python package is not found, install nnabla_converter package with "pip install nnabla_converter"'
          )
  
      with gfile.GFile(input_pb_file, "rb") as f:
          graph_def = tf.compat.v1.GraphDef()
          graph_def.ParseFromString(f.read())
          optimize = OptimizePb(graph_def).execute()
          optimize.export_to_file(output_pb_file)
          doc_file = output_pb_file.replace(".", "_") + ".json"
          with open(doc_file, "w") as f:
              json.dump(optimize.get_optimization_rate(), f)
  
imports: import json
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: optimize_pb_model_command(input_pb_file, output_pb_file) without return types