def align_labels(widgets, sticky=None):
    """Align the labels of a given list of widgets"""
    if len(widgets) <= 1:
        return
    widgets[0].update_idletasks()
    max_width = 0
    for widget in widgets:
        width = widget.grid_bbox(0, 0)[2]
        if width > max_width:
            max_width = width
    for widget in widgets:
        if sticky is not None:
            widget.label.grid(sticky=sticky)
        widget.grid_columnconfigure(0, minsize=max_width)
