def get_row(master):
    """Get first unused row in a given frame widget.

    Args:
        master (ttk.Frame): frame widget to check for an unused row

    Returns:
        int: first unused row of master widget
    """

    try:
        row = int(master.grid_slaves()[0].grid_info()["row"]) + 1
    except IndexError:
        # If master widget does not have any widgets plotted yet
        row = 0
    return row