code: def test_should_keep_type_of_return_value_after_rerun(self):
      # Generate widget id and reset context
      st.number_input(
          "a number", min_value=1, max_value=100, key="number"
      )
      widget_id = self.script_run_ctx.session_state.get_widget_states()[
          0
      ].id
      self.script_run_ctx.reset()
  
      # Set the state of the widgets to the test state
      widget_state = WidgetState()
      widget_state.id = widget_id
      widget_state.double_value = 42.0
      self.script_run_ctx.session_state._state._new_widget_state.set_widget_from_proto(
          widget_state
      )
  
      # Render widget again with the same parameters
      number = st.number_input(
          "a number", min_value=1, max_value=100, key="number"
      )
  
      # Assert output
      self.assertEqual(number, 42)
      self.assertEqual(type(number), int)
  
imports: from unittest.mock import MagicMock, patch
  import pytest
  from parameterized import parameterized
  import streamlit
  from streamlit.errors import StreamlitAPIException
  from streamlit.js_number import JSNumber
  from streamlit.proto.Alert_pb2 import Alert
  from streamlit.proto.LabelVisibilityMessage_pb2 import LabelVisibilityMessage
  from streamlit.proto.NumberInput_pb2 import NumberInput
  from streamlit.proto.WidgetStates_pb2 import WidgetState
  from streamlit.testing.v1.app_test import AppTest
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 28 for calling the NumberInputTest obj's underlying member method code with example usage: obj.test_should_keep_type_of_return_value_after_rerun() without return types