<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def csv(file, *args, **kwargs):
    '''
    Write CSV file.

    Parameters
    ----------
    file : Path
    *args
        csv.DictWriter args (except the f arg)
    **kwargs
        csv.DictWriter args

    Examples
    --------
    with write.csv(file) as writer:
        writer.writerow((1,2,3))
    '''
    with file.open('w', newline='') as f:
        yield DictWriter(f, *args, **kwargs)