<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_csv(fileobj, rows, encoding=ENCODING, dialect=DIALECT):
 """Dump rows to ``fileobj`` with the given ``encoding`` and CSV ``dialect``."""

    csvwriter = csv.writer(fileobj, dialect=dialect)
    csv_writerows(csvwriter, rows, encoding)