def METHOD_NAME(test_images, tmp_path):
    img_expected = iio.imread(test_images / "chelsea.png")
    iio.imwrite(tmp_path / "test.png", img_expected, plugin="opencv")
    result = iio.imread(tmp_path / "test.png")
    np.allclose(result, img_expected)
    img_expected = iio.imread(test_images / "chelsea.png", mode="RGBA")
    iio.imwrite(tmp_path / "test.png", img_expected, plugin="opencv")
    result = iio.imread(tmp_path / "test.png")
    np.allclose(result, img_expected)
    img_expected = iio.imread(test_images / "camera.png")
    iio.imwrite(tmp_path / "test.png", img_expected, plugin="opencv")
    result = iio.imread(tmp_path / "test.png")
    np.allclose(result, img_expected)
    img_expected = iio.imread(test_images / "camera.png")
    with pytest.raises(IOError):
        iio.imwrite("no_extension", img_expected, plugin="opencv")