code: def get_layers(model_dir, model_name, layers):
      model_file = "%s/%s.pb" % (model_dir, model_name)
      output_dir = "%s/output_models/" % model_dir
      if os.path.exists(output_dir):
          sh.rm("-rf", output_dir)
      os.makedirs(output_dir)
  
      convert(model_file, output_dir, layers)
  
      output_configs_path = output_dir + "outputs.yml"
      with open(output_configs_path) as f:
          output_configs = yaml.load(f)
      output_configs = output_configs["subgraphs"]
  
      return output_configs
  
imports: import argparse
  import copy
  import os
  import sh
  import yaml
  from py_proto import mace_pb2
  from transform.base_converter import ConverterUtil
  from transform.base_converter import MaceKeyword
  from transform.base_converter import MaceOp
  from transform.hexagon_converter import HexagonOp
  from utils.config_parser import DataFormat
  from utils.config_parser import ModelKeys
  from utils.util import mace_check
label_desc: Use image node_id 5 for calling a global function with example usage: get_layers(model_dir, model_name, layers) and returns: output_configs