code: def test_add_event_handler_raises_with_invalid_event():
      engine = Engine(lambda e, b: 1)
  
      with pytest.raises(
          ValueError, match=r"is not a valid event for this Engine"
      ):
          engine.add_event_handler("incorrect", lambda engine: None)
  
imports: import functools
  import gc
  from unittest.mock import call, create_autospec, MagicMock
  import pytest
  from pytest import raises
  from ignite.engine import Engine, Events, State
  from ignite.engine.events import EventsList
label_desc: Use image node_id 1 for calling a global function with example usage: test_add_event_handler_raises_with_invalid_event() without return types