<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _rc_context(rcparams):
 """ Context manager that temporarily overrides the pyplot rcParams. """

    deprecated = ['text.latex.unicode', 'examples.directory']
    old_rcparams = {k: mpl.rcParams[k] for k in mpl.rcParams.keys()
                    if mpl_version < '3.0' or k not in deprecated}
    mpl.rcParams.clear()
    mpl.rcParams.update(dict(old_rcparams, **rcparams))
    try:
        yield
    finally:
        mpl.rcParams.clear()
        mpl.rcParams.update(old_rcparams)