<span class="p">),</span> <span class="mi">0</span><span class="p">:</span><span class="mi">3</span><span class="p">]</span>
            <span class="n">mask_color_id</span> <span class="o">+=</span> <span class="mi">1</span>

            <span class="n">mask</span> <span class="o">=</span> <span class="n">decode_segment_to_mask</span><span class="p">(</span><span class="n">segms</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">image</span><span class="p">)</sp