code: def test_toggle():
      def script():
          import streamlit as st
  
          on = st.toggle("Activate feature")
          if on:
              st.write("Feature activated!")
  
      at = AppTest.from_function(script).run()
      assert at.toggle[0].value is False
  
      at.toggle[0].set_value(True).run()
      assert at.toggle[0].value is True
  
      repr(at.toggle[0])
  
imports: from datetime import date, datetime, time
  import numpy
  import pandas
  import pytest
  from streamlit.elements.markdown import MARKDOWN_HORIZONTAL_RULE_EXPRESSION
  from streamlit.testing.v1.app_test import AppTest
label_desc: Use image node_id 37 for calling a global function with example usage: test_toggle() without return types