code: def test_marshall_excludes_widgets_without_state(self):
      widget_states = WidgetStates()
      _create_widget("trigger", widget_states).trigger_value = True
  
      session_state = SessionState()
      session_state.set_widgets_from_proto(widget_states)
      session_state._set_widget_metadata(
          WidgetMetadata(
              "other_widget",
              lambda x, s: x,
              None,
              "trigger_value",
              True,
          )
      )
  
      widgets = session_state.get_widget_states()
  
      self.assertEqual(len(widgets), 1)
      self.assertEqual(widgets[0].id, "trigger")
  
imports: import inspect
  import unittest
  from unittest.mock import ANY, MagicMock, call, patch
  from parameterized import parameterized
  import streamlit
  from streamlit import errors
  from streamlit.proto.Common_pb2 import StringTriggerValue
  from streamlit.proto.WidgetStates_pb2 import WidgetStates
  from streamlit.runtime.scriptrunner.script_run_context import get_script_run_ctx
  from streamlit.runtime.state import coalesce_widget_states
  from streamlit.runtime.state.common import GENERATED_WIDGET_ID_PREFIX, compute_widget_id
  from streamlit.runtime.state.session_state import SessionState, WidgetMetadata
  from streamlit.runtime.state.widgets import user_key_from_widget_id
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 6 for calling the WidgetManagerTests obj's underlying member method code with example usage: obj.test_marshall_excludes_widgets_without_state() without return types