code: def get_event_filter(e):
      def event_filter(_, event):
          if event in e:
              return True
          return False
  
      return event_filter
  
imports: from __future__ import annotations
  import logging
  import os
  import re
  import tempfile
  import unittest
  from io import StringIO
  import torch
  from ignite.engine import Engine, Events
  from parameterized import parameterized
  from monai.handlers import StatsHandler
label_desc: Use image node_id 1 for calling a global function with example usage: get_event_filter(e) and returns: event_filter, False, True