code: def test_collect_layout_errors(flow, error_type, match):
      app = _MockApp()
      flow = flow()
  
      with pytest.raises(error_type, match=match):
          _collect_layout(app, flow)
  
imports: import pytest
  from lightning.app.core.flow import LightningFlow
  from lightning.app.core.work import LightningWork
  from lightning.app.frontend.web import StaticWebFrontend
  from lightning.app.utilities.layout import _collect_layout
label_desc: Use image node_id 2 for calling a global function with example usage: test_collect_layout_errors(flow, error_type, match) without return types