class="n">palettes</span><span class="p">[</span><span class="n">palette</span><span class="p">]</span>
        <span class="c1"># Calculate/get the layout of the graph</span>
        <span class="n">layout</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">ensure_layout</span><span class="p">(</span><span class="n">kwds</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;layout&quot;</span><span class="p">,<