<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_workbook(filename, table_list, column_width=None):
 """ Write an Excel workbook from a list of tables. Parameters filename : str Name of the Excel file to write. table_list : list of ``(str, DataFrame)`` tuples Tables to be saved as individual sheets in the Excel table. Each tuple contains two values: the name of the sheet to be saved as a string, and the contents of the table as a DataFrame. column_width: int, optional The column width to use when saving the spreadsheet. If None, calculate width automatically from the maximum number of characters in each column. """

    # Modify default header format
    # Pandas' default header format is bold text with thin borders. Here we
    # use bold text only, without borders.
    # The header style structure is in pd.core.format in pandas<=0.18.0,
    # pd.formats.format in 0.18.1<=pandas<0.20, and pd.io.formats.excel in
    # pandas>=0.20.
    # Also, wrap in a try-except block in case style structure is not found.
    format_module_found = False
    try:
        # Get format module
        if packaging.version.parse(pd.__version__) \
                <= packaging.version.parse('0.18'):
            format_module = pd.core.format
        elif packaging.version.parse(pd.__version__) \
                < packaging.version.parse('0.20'):
            format_module = pd.formats.format
        else:
            import pandas.io.formats.excel as format_module
        # Save previous style, replace, and indicate that previous style should
        # be restored at the end
        old_header_style = format_module.header_style
        format_module.header_style = {"font": {"bold": True}}
        format_module_found = True
    except AttributeError as e:
        pass

    # Generate output writer object
    writer = pd.ExcelWriter(filename, engine='xlsxwriter')

    # Write tables
    for sheet_name, df in table_list:
        # Convert index names to regular columns
        df = df.reset_index()
        # Write to an Excel sheet
        df.to_excel(writer, sheet_name=sheet_name, index=False)
        # Set column width
        if column_width is None:
            for i, (col_name, column) in enumerate(six.iteritems(df)):
                # Get the maximum number of characters in a column
                max_chars_col = column.astype(str).str.len().max()
                max_chars_col = max(len(col_name), max_chars_col)
                # Write width
                writer.sheets[sheet_name].set_column(
                    i,
                    i,
                    width=1.*max_chars_col)
        else:
            writer.sheets[sheet_name].set_column(
                0,
                len(df.columns) - 1,
                width=column_width)

    # Write excel file
    writer.save()

    # Restore previous header format
    if format_module_found:
        format_module.header_style = old_header_style