code: def run_layers_validate(flags, args, original_conf):
      model_name = flags.model_name
      original_model_dir = (
          flags.output + "/" + original_conf["library_name"] + "/model"
      )
      model_dir = "/tmp/micro_run/model"
      device.execute("mkdir -p %s" % model_dir)
      device.execute(
          "cp -p %s/%s.pb %s"
          % (original_model_dir, model_name, model_dir)
      )
      params_file_path = "%s/%s.data" % (original_model_dir, model_name)
      output_configs = layers_validate.get_layers(
          model_dir, model_name, flags.layers
      )
  
      for i in range(len(output_configs)):
          sub_model_conf = gen_sub_model_conf(
              output_configs[i], flags, original_conf
          )
          print(output_configs[i]["model_file_path"])
          with open(
              output_configs[i]["model_file_path"], "rb"
          ) as model_file:
              net_def = mace_pb2.NetDef()
              net_def.ParseFromString(model_file.read())
              with open(params_file_path, "rb") as params_file:
                  weights = bytearray(params_file.read())
                  micro_conf = config_parser.normalize_model_config(
                      sub_model_conf
                  )
                  MicroConverter(
                      micro_conf, net_def, weights, model_name
                  ).gen_code()
                  build_engine(
                      model_name, micro_conf[ModelKeys.data_type]
                  )
                  for graph_name, graph_config in micro_conf[
                      ModelKeys.subgraphs
                  ].items():  # noqa
                      run_model_with_conf(
                          flags, args, model_name, graph_config
                      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import copy
  import numpy
  import shutil
  import tempfile
  from micro_converter import MicroConverter
  from py_proto import mace_pb2
  import run_target
  from utils import util
  from utils import device
  from utils import config_parser
  from utils.target import Target
  from utils.config_parser import ModelKeys
  from utils.util import MaceLogger
  from utils.util import mace_check
  import validate
  import layers_validate
label_desc: Use image node_id 6 for calling a global function with example usage: run_layers_validate(flags, args, original_conf) without return types