def temp_image_bytes():
    """Generate a 100x100 red image directly in memory and return its bytes."""
    width, height = 100, 100
    red_array = np.zeros((height, width, 3), dtype=np.uint8)
    red_array[:, :, 0] = 255

    img = Image.fromarray(red_array)

    buffer = io.BytesIO()
    img.save(buffer, format="PNG")
    buffer.seek(0)

    return buffer.read()
Generate a 100x100 red image directly in memory and return its bytes.
llama-index-integrations/llms/llama-index-llms-bedrock-converse/tests/test_llms_bedrock_converse.py