def munge_lanes(l):
    """Take the lanes arguments and return a dict {'lanes': [int, int, int]} or else
       an empty dict - ie. converts sys.argv to **kwargs format.
    """
    res = dict(lanes=[])
    for al in l:
        if al.startswith('lane'):
            res['lanes'].append(al[4:])
        elif al == 'overview':
            # special case
            return {}
        else:
            res['lanes'].append(al)
    return res if res['lanes'] else {}