code: def mpl_rc_context(f):
      """
      Decorator for MPLPlot methods applying the matplotlib rc params
      in the plots fig_rcparams while when method is called.
      """
  
      def wrapper(self, *args, **kwargs):
          with _rc_context(self.fig_rcparams):
              return f(self, *args, **kwargs)
  
      return wrapper
  
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 2 for calling a global function with example usage: mpl_rc_context(f) and returns: wrapper, f