code: def get_handler_event_names(method: Callable) -> Set[str]:
      return getattr(method, "_handled_events_set_", set())
  
imports: import inspect
  from typing import Callable, Set
label_desc: Use image node_id 2 for calling a global function with example usage: get_handler_event_names(method) and returns: getattr