def normalize_list(items, width, filler = None):
#===============================================================================
    """
    Normalize list to a specified width, truncating or filling as needed.
    Filler data can be supplied by caller. The filler will be copied to each
    added item. None will be used as the filler if none is provided.
    """
    assert items is not None
    assert width >= 0
    output = items[:width]
    if len(output) < width:
        output += filler * (width - len(output))
    return tuple(output)