<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _ensure_panel_ids(dashboard):
    '''Assign panels auto-incrementing IDs.'''
    panel_id = 1
    for row in dashboard.get('rows', []):
        for panel in row.get('panels', []):
            panel['id'] = panel_id
            panel_id += 1