def subdivide_groups(items, divisions=2):
    groups = []
    num_items = len(items)
    last_offset = 0
    # Determine the length of each subdivision
    sections = num_items // divisions
    for _ in range(num_items):
        # Append based on current range, shift, repeat.
        sub_group = items[last_offset:last_offset + sections]
        # Any uneven offsets will simply be empty -- don't include them.
        if sub_group:
            groups.append(sub_group)
        # Update the last offset for the next index.
        last_offset += sections
    return groups
Load a ``*.grad`` file (*grad_file_name*) and set the given volume
dataset/ETHPy150Open christabor/MoAL/MOAL/helpers/generic.py/subdivide_groups--crossover with--dataset/ETHPy150Open enthought/mayavi/mayavi/modules/volume.py/load_volume_prop_from_grad