span class="n">scalar_map</span> <span class="o">=</span> <span class="n">cmx</span><span class="o">.</span><span
            class="n">ScalarMappable</span><span class="p">(</span><span class="n">norm</span><span
            class="o">=</span><span class="n">color_norm</span><span class="p">,</span> <span class="n">cmap</span><span
            class="o">=</span><span class="n">cmap</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">map_index_to_rgb_color</span><span class="p">(