def METHOD_NAME(im):
    outfile = str(tmp_path / "temp.bmp")
    im.save(outfile, "BMP")
    with Image.open(outfile) as reloaded:
        reloaded.load()
        assert im.mode == reloaded.mode
        assert im.size == reloaded.size
        assert reloaded.format == "BMP"
        assert reloaded.get_format_mimetype() == "image/bmp"