code: def normalize_model_config(
      conf, model_output=None, org_model_dir=None
  ):
      conf = normalize_graph_config(conf, model_output, org_model_dir)
      if ModelKeys.subgraphs in conf:
          nor_subgraphs = {}
          if isinstance(conf[ModelKeys.subgraphs], list):
              nor_subgraph = normalize_graph_config(
                  conf[ModelKeys.subgraphs][0],
                  model_output,
                  org_model_dir,
              )
              conf[ModelKeys.input_tensors] = nor_subgraph[
                  ModelKeys.input_tensors
              ]
              conf[ModelKeys.output_tensors] = nor_subgraph[
                  ModelKeys.output_tensors
              ]
              if ModelKeys.validation_inputs_data in nor_subgraph:
                  conf[ModelKeys.validation_inputs_data] = nor_subgraph[
                      ModelKeys.validation_inputs_data
                  ]
              if ModelKeys.validation_outputs_data in nor_subgraph:
                  conf[
                      ModelKeys.validation_outputs_data
                  ] = nor_subgraph[ModelKeys.validation_outputs_data]
              set_default_config_value(nor_subgraph, conf)
              nor_subgraphs[ModelKeys.default_graph] = nor_subgraph
          else:
              for graph_name, subgraph in conf[
                  ModelKeys.subgraphs
              ].items():
                  nor_subgraph = normalize_graph_config(
                      subgraph, model_output, org_model_dir
                  )
                  set_default_config_value(nor_subgraph, conf)
                  nor_subgraphs[graph_name] = nor_subgraph
  
          conf[ModelKeys.subgraphs] = nor_subgraphs
  
          model_base_conf = copy.deepcopy(conf)
          del model_base_conf[ModelKeys.subgraphs]
          subgraphs = conf[ModelKeys.subgraphs]
          for net_name, subgraph in subgraphs.items():
              net_conf = copy.deepcopy(model_base_conf)
              net_conf.update(subgraph)
              subgraphs[net_name] = net_conf
  
      MaceLogger.summary(conf)
      return conf
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import re
  import os
  import copy
  import yaml
  from enum import Enum
  from utils import util
  from utils.util import mace_check
  from utils.util import MaceLogger
  from py_proto import mace_pb2
label_desc: Use image node_id 16 for calling a global function with example usage: normalize_model_config(conf, model_output, org_model_dir) and returns: conf