code: def test_context_with_badparam():
      original_value = "gray"
      other_value = "blue"
      with style.context({PARAM: other_value}):
          assert mpl.rcParams[PARAM] == other_value
          x = style.context({PARAM: original_value, "badparam": None})
          with pytest.raises(KeyError):
              with x:
                  pass
          assert mpl.rcParams[PARAM] == other_value
  
imports: from contextlib import contextmanager
  from pathlib import Path
  from tempfile import TemporaryDirectory
  import sys
  import numpy
  import pytest
  import matplotlib
  from matplotlib import pyplot, style
  from matplotlib.style.core import USER_LIBRARY_PATHS, STYLE_EXTENSION
label_desc: Use image node_id 12 for calling a global function with example usage: test_context_with_badparam() without return types