<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def teehtml(table, source=None, encoding=None, errors='strict', caption=None, vrepr=text_type, lineterminator='\n', index_header=False, tr_style=None, td_styles=None, truncate=None):
 """ Return a table that writes rows to a Unicode HTML file as they are iterated over. """


    source = write_source_from_arg(source)
    return TeeHTMLView(table, source=source, encoding=encoding, errors=errors,
                       caption=caption, vrepr=vrepr,
                       lineterminator=lineterminator, index_header=index_header,
                       tr_style=tr_style, td_styles=td_styles,
                       truncate=truncate)