<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tabset(titles, contents):
 """A tabbed container widget"""


    tabs = []
    for no, title in enumerate(titles):
        tab = {
            'title': title,
        }
        content = contents[no]
        if isinstance(content, list):
            tab['items'] = content
        else:
            tab['items'] = [content]
        tabs.append(tab)

    result = {
        'type': 'tabs',
        'tabs': tabs
    }

    return result