code: def optimization_command(args):
      input_file = args.input_file[0]
      output_file = args.output_file[0]
      ext = os.path.splitext(input_file)[1]
      if ext == ".pb":
          if os.path.splitext(output_file)[1] != ".pb":
              raise ValueError("Input or output file format error.")
          optimize_pb_model_command(input_file, output_file)
      elif ext == ".nnp":
          if os.path.splitext(output_file)[1] != ".nnp":
              raise ValueError("Input or output file format error.")
          optimize_nnp_model_command(input_file, output_file)
      else:
          raise ValueError(f"{ext} is unsupported file format.")
  
imports: import json
  import os
label_desc: Use image node_id 3 for calling a global function with example usage: optimization_command(args) without return types