def get_param(l, exclude=set(['top', 'bottom', 'name', 'type'])):
    if (not hasattr(l, 'ListFields')):
        if hasattr(l, '__delitem__'):
            return [get_param(i) for i in l]
        return l
    r = dict()
    for (f, v) in l.ListFields():
        if (f.name not in exclude):
            r[f.name] = get_param(v, [])
    return r
def get_param(l, exclude=set(['top', 'bottom', 'name', 'type'])):
    if (not hasattr(l, 'ListFields')):
        if hasattr(l, '__delitem__'):
            return [get_param(i) for i in l]
        return l
    r = dict()
    for (f, v) in l.ListFields():
        if (f.name not in exclude):
            r[f.name] = get_param(v, [])
    return r