code: def _rc_context(rcparams):
      """
      Context manager that temporarily overrides the pyplot rcParams.
      """
      old_rcparams = get_old_rcparams()
      mpl.rcParams.clear()
      mpl.rcParams.update(dict(old_rcparams, **rcparams))
      try:
          yield
      finally:
          mpl.rcParams.clear()
          mpl.rcParams.update(old_rcparams)
  
imports: from contextlib import contextmanager
  from itertools import chain
  import matplotlib
  import numpy
  import param
  from matplotlib import animation, gridspec, pyplot, rcParams
  from matplotlib.font_manager import font_scalings
  from mpl_toolkits.mplot3d import Axes3D
  from ...core import AdjointLayout, Collator, CompositeOverlay, Element, Empty, GridMatrix, GridSpace, HoloMap, Layout, NdLayout
  from ...core.options import SkipRendering, Store
  from ...core.util import int_to_alpha, int_to_roman, wrap_tuple_streams
  from ..plot import DimensionedPlot, GenericAdjointLayoutPlot, GenericCompositePlot, GenericElementPlot, GenericLayoutPlot
  from ..util import attach_streams, collate, displayable
  from .util import compute_ratios, fix_aspect, get_old_rcparams
label_desc: Use image node_id 1 for calling a global function with example usage: _rc_context(rcparams) without return types