code: def test_save_and_load_model_when_input_has_read_function(
      self,
  ) -> None:
      proto = _simple_model()
      # When the proto is a bytes representation provided to `save_model`,
      # it should always be a serialized binary protobuf representation. Aka. format="protobuf"
      # The saved file format is specified by the `format` argument.
      proto_string = serialization.registry.get(
          "protobuf"
      ).serialize_proto(proto)
      f = io.BytesIO()
      onnx.save_model(proto_string, f, format=self.format)
      loaded_proto = onnx.load_model(
          io.BytesIO(f.getvalue()), format=self.format
      )
      self.assertEqual(proto, loaded_proto)
  
imports: import io
  import os
  import pathlib
  import tempfile
  import unittest
  import google.protobuf.message
  import google.protobuf.text_format
  import parameterized
  import onnx
  from onnx import serialization
label_desc: Use image node_id 2 for calling the TestIO obj's underlying member method code with example usage: obj.test_save_and_load_model_when_input_has_read_function() without return types