>
    <span class="c1"># Group all the paths by given group_id</span>
    <span class="n">file_groups</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">paths</span><span class="p">):</span>
        <span class="n">group_id</span> <span class="o">=</span> <span class="n">group_callback</span><span class="p">(</span><span class="n">p</span><span class