code: def test_serialize():
      fstream = io.BytesIO(b"123")
      img = Image.from_file(fstream)
  
      img_state = img.get_state()
  
      # for python27 it is a memoryview
      assert isinstance(img_state["value"], (bytes, memoryview))
      # make sure it is (for python 3), since that is what it will be once it comes off the wire
      img_state["value"] = memoryview(img_state["value"])
  
      # check that we can deserialize it and get back the original value
      img_copy = Image()
      img_copy.set_state(img_state)
      assert img.value == img_copy.value
  
imports: import io
  import os
  from ipywidgets import Image
  import hashlib
  import pkgutil
  import tempfile
  from contextlib import contextmanager
label_desc: Use image node_id 14 for calling a global function with example usage: test_serialize() without return types