ss="w">    </span><span class="sd">"""Shuffle the given file list by group</span>

<span class="sd">    This uses the given 'group_callback' argument to determine the "group"</span>
<span class="sd">    that each file path in the given list belongs.</span>
<span class="sd">    It then shuffles each group and returns the shuffles groups as a flat list.</span>

<span class="sd">    This is useful as it allows for splitting the list into training and validation</span>
<span class="sd">    subsets while ensurin