code: def write_onnx_model_with_bounds(
      filename, onnx_model=None, input_bounds=None
  ):
      """
      Write the ONNX model to the given file.
  
      If `input_bounds` is not None, write it alongside the ONNX model.
  
      Parameters
      ----------
      filename : str
          the path where the ONNX model is written
      onnx_model : onnx model or None
          the onnx model
      input_bounds : None or dict-like or list
          bounds on the input variables
      """
      if onnx_model is not None:
          with open(filename, "wb") as f:
              f.write(onnx_model.SerializeToString())
  
      if input_bounds is not None:
          write_input_bounds(f"{filename}.bounds.json", input_bounds)
  
imports: import json
  from pathlib import Path
  import onnx
  from omlt.io.input_bounds import load_input_bounds, write_input_bounds
  from omlt.io.onnx_parser import NetworkParser
label_desc: Use image node_id 1 for calling a global function with example usage: write_onnx_model_with_bounds(filename, onnx_model, input_bounds) without return types