def METHOD_NAME():
    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