@contextmanager
def ignore_errors_context(flag=True):
    '\n    Set ignore_errors to the given flag in this context.\n\n    Parameters\n    ----------\n    flag : bool\n        If not None, set ignore_errors to this value.\n\n    Yields\n    ------\n    None\n    '
    save = ignore_errors()
    ignore_errors(flag)
    try:
        (yield)
    finally:
        ignore_errors(save)
Set ignore_errors to the given flag in this context.

Parameters
----------
flag : bool
    If not None, set ignore_errors to this value.

Yields
------
None
@contextmanager
def ignore_errors_context(flag=True):
    '\n    Set ignore_errors to the given flag in this context.\n\n    Parameters\n    ----------\n    flag : bool\n        If not None, set ignore_errors to this value.\n\n    Yields\n    ------\n    None\n    '
    save = ignore_errors()
    ignore_errors(flag)
    try:
        (yield)
    finally:
        ignore_errors(save)