code: def create_events_matrix():
      events = set({})
      component_events = {}
      for component in docs["component"]:
          component_event_list = []
          for event in component["class"].EVENTS:
              events.add(event)
              for fn in component["fns"]:
                  if event == fn["name"]:
                      component_event_list.append(event)
          component_events[component["name"]] = component_event_list
  
      return list(events), component_events
  
file_path: gradio/js/_website/generate_jsons/src/docs/__init__.py
imports: import html
  import json
  import os
  from gradio_client.documentation import document_cls, generate_documentation
  import gradio
  from ..guides import guides
  import requests
label_desc: Use image node_id 3 for calling a global function with example usage: create_events_matrix() and returns: list,  component_events