from __future__ import annotations from io import BytesIO from PIL import Image def make_test_png() -> bytes: image = Image.new("RGB", (8, 8), color=(70, 129, 109)) buffer = BytesIO() image.save(buffer, format="PNG") return buffer.getvalue()