code: def test_second_metric_in_first_row(app: Page):
      expect(
          app.locator("[data-testid='stMetricLabel']").nth(2)
      ).to_have_text("S&P 500")
      expect(
          app.locator("[data-testid='stMetricValue']").nth(2)
      ).to_have_text(" -4.56 ")
      expect(
          app.locator("[data-testid='stMetricDelta']").nth(2)
      ).to_have_text(" -50 ")
  
file_path: streamlit/e2e_playwright/st_metric_test.py
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_second_metric_in_first_row(app) without return types