code: def test_event_pyi_file_matches_source_code():
      """Test that the template used to create pyi files (search INTERFACE_TEMPLATE in component_meta) matches the source code of EventListener._setup."""
      code = (
          Path(__file__).parent
          / ".."
          / "gradio"
          / "components"
          / "button.pyi"
      ).read_text()
      mod = ast.parse(code)
      segment = None
      for node in ast.walk(mod):
          if isinstance(node, ast.FunctionDef) and node.name == "click":
              segment = ast.get_source_segment(code, node)
  
      # This would fail if Button no longer has a click method
      assert segment
      sig = inspect.signature(gr.Button.click)
      for param in sig.parameters.values():
          if param.name == "block":
              continue
          assert param.name in segment
  
file_path: gradio/test/test_events.py
imports: import ast
  import inspect
  from pathlib import Path
  import pytest
  from fastapi.testclient import TestClient
  import gradio
label_desc: Use image node_id 1 for calling a global function with example usage: test_event_pyi_file_matches_source_code() without return types