code: def _convert_model_from_object_to_bytearray(model_object):
      """Converts a tflite model from a parsable object into a bytearray."""
      # Initial size of the buffer, which will grow automatically if needed
      builder = flatbuffers.Builder(1024)
      model_offset = model_object.Pack(builder)
      builder.Finish(
          model_offset, file_identifier=_TFLITE_FILE_IDENTIFIER
      )
      return bytes(builder.Output())
  
file_path: compute-engine/larq_compute_engine/mlir/python/util.py
imports: import copy
  import flatbuffers
  import tensorflow
  from larq_compute_engine.mlir.python import tflite_schema
label_desc: Use image node_id 3 for calling a global function with example usage: _convert_model_from_object_to_bytearray(model_object) and returns: bytes