code: def test_alert_displays_a_warning_message(
      themed_app: Page, assert_snapshot: ImageCompareFunction
  ):
      alert_elements = themed_app.get_by_test_id("stAlert")
      expect(alert_elements.nth(1)).to_have_text("This is a warning")
  
      assert_snapshot(alert_elements.nth(1), name="st_alert_warning")
  
imports: from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction
label_desc: Use image node_id 2 for calling a global function with example usage: test_alert_displays_a_warning_message(themed_app, assert_snapshot) without return types