code: def _check_model_config(model_config):
      if model_config is not None:
          if not all(
              k in model_config for k in ("Precision", "ReuseFactor")
          ):
              raise Exception(
                  "Precision and ReuseFactor must be provided in the hls_config"
              )
      else:
          model_config = {}
          model_config["Precision"] = "ap_fixed<16,6>"
          model_config["ReuseFactor"] = 1
  
      return model_config
  
imports: import importlib
  import os
  import warnings
  import yaml
  from hls4ml.converters.keras_to_hls import KerasFileReader
  from hls4ml.converters.keras_to_hls import KerasModelReader
  from hls4ml.converters.keras_to_hls import KerasReader
  from hls4ml.converters.keras_to_hls import get_supported_keras_layers
  from hls4ml.converters.keras_to_hls import parse_keras_model
  from hls4ml.converters.keras_to_hls import keras_to_hls, register_keras_layer_handler
  from hls4ml.model import ModelGraph
  from hls4ml.utils.config import create_config
  from hls4ml.utils.symbolic_utils import LUTFunction
label_desc: Use image node_id 4 for calling a global function with example usage: _check_model_config(model_config) and returns: model_config