def METHOD_NAME(size, transparent=True):
    if transparent:
        img = Image.new("RGBA", size)
    else:
        img = Image.new("RGB", size, ImageColor.getrgb("#EEE"))
    draw = ImageDraw.Draw(img)
    draw_pattern(draw, size)
    return img