def tab(tab_name, element_list=None, section_list=None):
_tab = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': tab_name,<EOL>}<EOL>if element_list is not None:<EOL><INDENT>if isinstance(element_list, list):<EOL><INDENT>_tab['<STR_LIT>'] = element_list<EOL><DEDENT>else:<EOL><INDENT>_tab['<STR_LIT>'] = [element_list]<EOL><DEDENT><DEDENT>if section_list is not None:<EOL><INDENT>if isinstance(section_list, list):<EOL><INDENT>_tab['<STR_LIT>'] = section_list<EOL><DEDENT>else:<EOL><INDENT>if '<STR_LIT>' not in section_list:<EOL><INDENT>_tab['<STR_LIT>'] = element_list<EOL><DEDENT>else:<EOL><INDENT>_tab['<STR_LIT>'].append(element_list)<EOL><DEDENT><DEDENT><DEDENT>return _tab<EOL>
Returns a dictionary representing a new tab to display elements.
This can be thought of as a simple container for displaying multiple
types of information.

Args:
    tab_name: The title to display
    element_list: The list of elements to display. If a single element is
                  given it will be wrapped in a list.
    section_list: A list of sections to display.

Returns:
    A dictionary with metadata specifying that it is to be rendered
    as a page containing multiple elements and/or tab.