code: def convert(conf, output, enable_micro=False):
      for model_name, model_conf in conf["models"].items():
          model_output = output + "/" + model_name + "/model"
          org_model_dir = output + "/" + model_name + "/org_model"
          util.mkdir_p(model_output)
          util.mkdir_p(org_model_dir)
  
          model_conf = normalize_model_config(
              model_conf, model_output, org_model_dir
          )
          conf["models"][model_name] = model_conf
          net_confs = model_conf[ModelKeys.subgraphs]
  
          model = mace_pb2.MultiNetDef()
          add_input_output_tensor(model, model_conf)
  
          model_params = []
          for net_name, net_conf in net_confs.items():
              if "quantize_stat" in conf:
                  net_conf["quantize_stat"] = conf["quantize_stat"]
              net_def_with_Data = convert_net(
                  net_name, net_conf, enable_micro
              )
              try:
                  visualizer = visualize_model.ModelVisualizer(
                      net_name, net_def_with_Data, model_output
                  )
                  visualizer.save_html()
              except:  # noqa
                  print("Failed to visualize graph:", sys.exc_info())
              net_def, params = merge_params(
                  net_def_with_Data, net_conf[ModelKeys.data_type]
              )
              if enable_micro:
                  convert_micro(
                      model_name,
                      net_confs,
                      net_def,
                      params,
                      model_output,
                  )
  
              net_def.data_offset = len(model_params)
              net_def.data_size = len(params)
              model.net_def.extend([net_def])
              model_params.extend(params)
          # store model and weight to files
          output_model_file = model_output + "/" + model_name + ".pb"
          output_params_file = model_output + "/" + model_name + ".data"
          with open(output_model_file, "wb") as f:
              f.write(model.SerializeToString())
          with open(output_params_file, "wb") as f:
              f.write(bytearray(model_params))
          with open(output_model_file + "_txt", "w") as f:
              f.write(str(model))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import copy
  import sys
  from micro_converter import MicroConverter
  from py_proto import mace_pb2
  from utils import config_parser
  from utils.config_parser import DataFormat
  from utils.config_parser import DeviceType
  from utils.config_parser import Platform
  from utils import util
  from utils.util import mace_check
  from utils.config_parser import normalize_model_config
  from utils.config_parser import ModelKeys
  from utils.convert_util import merge_params
  from transform import base_converter
  from transform import transformer
  from visualize import visualize_model
label_desc: Use image node_id 4 for calling a global function with example usage: convert(conf, output, enable_micro) without return types