code: def test_set_query_params():
      def script():
          import streamlit as st
  
          st.experimental_set_query_params(foo="bar")
  
      at = AppTest.from_function(script).run()
      # parse.parse_qs puts everything in lists
      assert at.query_params["foo"] == ["bar"]
  
file_path: streamlit/lib/tests/streamlit/testing/app_test_test.py
imports: import pytest
  from streamlit.testing.v1 import AppTest
label_desc: Use image node_id 4 for calling a global function with example usage: test_set_query_params() without return types