code: def test_handles_expand_collapse_of_mpa_nav_correctly(
      page: Page, app_port: int, assert_snapshot: ImageCompareFunction
  ):
      """Test that we handle expand/collapse of MPA nav correctly."""
  
      page.goto(f"http://localhost:{app_port}/page_7")
      wait_for_app_loaded(page)
  
      separator = page.get_by_test_id("stSidebarNavSeparator")
      svg = separator.locator("svg")
  
      # Expand the nav
      svg.click()
      assert_snapshot(
          page.get_by_test_id("stSidebarNav"),
          name="mpa-sidebar_nav_expanded",
      )
  
      # Collapse the nav
      svg.click()
      assert_snapshot(
          page.get_by_test_id("stSidebarNav"),
          name="mpa-sidebar_nav_collapsed",
      )
  
      # Expand the nav again
      svg.click()
      assert_snapshot(
          page.get_by_test_id("stSidebarNav"),
          name="mpa-sidebar_nav_expanded",
      )
  
file_path: streamlit/e2e_playwright/multipage_apps/mpa_basics_test.py
imports: from playwright.sync_api import Page, expect
  from e2e_playwright.conftest import ImageCompareFunction, wait_for_app_loaded, wait_for_app_run
label_desc: Use image node_id 10 for calling a global function with example usage: test_handles_expand_collapse_of_mpa_nav_correctly(page, app_port, assert_snapshot) without return types