code: def test_events_attached(self):
      chatbot = gr.ChatInterface(double)
      dependencies = chatbot.dependencies
      textbox = chatbot.textbox._id
      submit_btn = chatbot.submit_btn._id
      assert next(
          (
              d
              for d in dependencies
              if d["targets"]
              == [(textbox, "submit"), (submit_btn, "click")]
          ),
          None,
      )
      for btn_id in [
          chatbot.retry_btn._id,
          chatbot.clear_btn._id,
          chatbot.undo_btn._id,
      ]:
          assert next(
              (
                  d
                  for d in dependencies
                  if d["targets"][0] == (btn_id, "click")
              ),
              None,
          )
  
imports: import tempfile
  from concurrent.futures import wait
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  import gradio
label_desc: Use image node_id 4 for calling the TestInit obj's underlying member method code with example usage: obj.test_events_attached() without return types