code: def test_patched_work():
      class TestState:
          test_variable = 1
  
      patched_work = _PatchedWork(TestState(), ServeStreamlitTest)
  
      assert patched_work.test_variable == 1
      assert patched_work.test_property == 1
      assert patched_work.test_method() == "test_method"
      assert patched_work.test_staticmethod() == "test_staticmethod"
  
file_path: pytorch-lightning/tests/tests_app/components/serve/test_streamlit.py
imports: import os
  import sys
  from unittest import mock
  import lightning.app
  import pytest
  from lightning.app.components.serve.streamlit import ServeStreamlit, _build_model, _PatchedWork
  from lightning_utilities.core.imports import RequirementCache
label_desc: Use image node_id 2 for calling a global function with example usage: test_patched_work() without return types