ranges and each box is left-aligned within its subspace. Otherwise (*total* is *None*), *sep* must be provided and each box is left-aligned in its subspace of width ``(max(widths) + sep)``. The total width is then calculated to be ``N * (max(widths) + sep)``. Parameters ---------- widths : list of float Widths of boxes to be packed. total : float or None Intended total length. *None* if not used. sep : float or None Spacing between boxes. mode : {'fixed', 'expand', 'equal'} The packing mode. Returns ------- total : float The total width needed to accommodate the laid out boxes. offsets : array of float The left offsets of the boxes. )