code: def write_model(model_object, output_tflite_file):
      """Writes the tflite model, a python object, into the output file.
  
      NOTE: This API only works for TFLite generated with
      _experimental_use_buffer_offset=false
  
      Args:
        model_object: A tflite model as a python object
        output_tflite_file: Full path name to the output tflite file.
  
      Raises:
        IOError: If output_tflite_file path is invalid or cannot be opened.
      """
      if sys.byteorder == "big":
          model_object = copy.deepcopy(model_object)
          byte_swap_tflite_model_obj(model_object, "big", "little")
      model_bytearray = convert_object_to_bytearray(model_object)
      with gfile.GFile(output_tflite_file, "wb") as output_file_handle:
          output_file_handle.write(model_bytearray)
  
imports: import copy
  import random
  import re
  import struct
  import sys
  import flatbuffers
  from tensorflow.lite.python import schema_py_generated
  from tensorflow.lite.python import schema_util
  from tensorflow.python.platform import gfile
label_desc: Use image node_id 5 for calling a global function with example usage: write_model(model_object, output_tflite_file) without return types