code: def test_custom_events_with_events_list():
      class CustomEvents(EventEnum):
          TEST_EVENT = "test_event"
  
      def process_func(engine, batch):
          engine.fire_event(CustomEvents.TEST_EVENT)
  
      engine = Engine(process_func)
      engine.register_events(*CustomEvents)
  
      # Handle should be called
      handle = MagicMock()
      engine.add_event_handler(
          CustomEvents.TEST_EVENT | Events.STARTED, handle
      )
      engine.run(range(1))
      assert handle.called
  
imports: from enum import Enum
  from unittest.mock import MagicMock
  import pytest
  import torch
  import ignite.distributed
  from ignite.engine import Engine, Events
  from ignite.engine.events import CallableEventWithFilter, EventEnum, EventsList
label_desc: Use image node_id 4 for calling a global function with example usage: test_custom_events_with_events_list() without return types