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

def save_layout(vehname):
    '''save window layout'''
    global display_size
    global window_list
    global vehiclename
    if display_size is None:
        print("No layouts to save")
        return
    vehiclename = vehname
    fname = layout_filename(False)
    if fname is None:
        print("No file to save layout to")
        return
    layout = {}
    try:
        # include previous layout, so we retain layouts for widows not
        # currently displayed
        layout = pickle.load(open(fname,"rb"))
    except Exception:
        pass
    count = 0
    for name in window_list:
        layout[name] = window_list[name].layout
        count += 1
    pickle.dump(layout, open(fname,"wb"))
    print("Saved layout for %u windows" % count)