ass="k">if</span> <span class="n">total_iterations</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
        <span class="n">total_iterations</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">iterator</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="k">for</span> <span class="n">iterator</span> <span class="ow">in</span> <span c