pan><span class="p">(</span><span class="n">processes</span><span class="o">=</span><span class="n">thread_count</span><span class="p">)</span>

    <span class="c1"># Second, build an index of the images</span>
    <span class="c1"># in the different class subfolders.</span>
    <span class="n">results</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="k">for</span> <span class="n">clazz</span> <span class="ow">in</span> <span class="n">classes</span><span class="p">:</span>
       