ro">
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">import importlib.util

package_name = &#34;pillow&#34;
spec = importlib.util.find_spec(package_name)

if spec is None:
    Warning(&#34;Pillow is not installed. You cannot render to the bitmap context!&#34;)
    PYFLOWSHEET_PILLOW_MISSING = True
else:
    from PIL import Image, ImageDraw

    PYFLOWSHEET_PILLOW_MISSING = False


class BitmapContext(object):
    def __init__(self, size):

        if P