code: def test__getitem__raises_KeyError_for_nonexistent_key(self):
      with pytest.raises(KeyError):
          self.query_params["nonexistent"]
  
imports: import pytest
  from streamlit.errors import StreamlitAPIException
  from streamlit.runtime.state.query_params import QueryParams
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 5 for calling the QueryParamsMethodTests obj's underlying member method code with example usage: obj.test__getitem__raises_KeyError_for_nonexistent_key() without return types