code: def test_event_defined_invalid_scope(self):
      with gr.Blocks() as demo:
          textbox = gr.Textbox()
          textbox.blur(lambda x: x + x, textbox, textbox)
  
      with pytest.raises(AttributeError):
          demo.load(lambda: "hello", None, textbox)
  
      with pytest.raises(AttributeError):
          textbox.change(lambda x: x + x, textbox, textbox)
  
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 the TestEventErrors obj's underlying member method code with example usage: obj.test_event_defined_invalid_scope() without return types