code: def _get_mods(evt):
      """Helper to extract list of mods from event"""
      mods = []
      mods += [keys.CONTROL] if evt.ControlDown() else []
      mods += [keys.ALT] if evt.AltDown() else []
      mods += [keys.SHIFT] if evt.ShiftDown() else []
      mods += [keys.META] if evt.MetaDown() else []
      return mods
  
imports: from __future__ import division
  from time import sleep
  import gc
  import warnings
  from ..base import BaseApplicationBackend, BaseCanvasBackend, BaseTimerBackend
  from ...util import keys, logger
  from ...util.ptime import time
  from ...None import config
label_desc: Use image node_id 2 for calling a global function with example usage: _get_mods(evt) and returns: mods