@contextmanager<EOL>def with_csv_dialect(name, **kwargs):
import csv<EOL>_BUILTIN_DIALECTS = {"<STR_LIT>", "<STR_LIT>", "<STR_LIT>"}<EOL>if name in _BUILTIN_DIALECTS:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>csv.register_dialect(name, **kwargs)<EOL>yield<EOL>csv.unregister_dialect(name)<EOL>
Context manager to temporarily register a CSV dialect for parsing CSV.

Parameters
----------
name : str
    The name of the dialect.
kwargs : mapping
    The parameters for the dialect.

Raises
------
ValueError : the name of the dialect conflicts with a builtin one.

See Also
--------
csv : Python's CSV library.