class_docstr: Pyglet backend for Canvas abstract class.
class_docstr_tok: ["Pyglet","backend","for","Canvas","abstract","class","."]
code: def _modifiers(self, pygletmod=None):
      mod = ()
      if pygletmod is None:
          pygletmod = self._current_modifiers
      if isinstance(pygletmod, set):
          for key in pygletmod:
              mod += (KEYMAP[key],)
      else:
          if pygletmod & pyglet.window.key.MOD_SHIFT:
              mod += (keys.SHIFT,)
          if pygletmod & pyglet.window.key.MOD_CTRL:
              mod += (keys.CONTROL,)
          if pygletmod & pyglet.window.key.MOD_ALT:
              mod += (keys.ALT,)
      return mod
  
imports: from __future__ import division
  from packaging.version import Version
  from time import sleep
  from ..base import BaseApplicationBackend, BaseCanvasBackend, BaseTimerBackend
  from ...util import keys
  from ...util.ptime import time
  from ...None import config
label_desc: Use image node_id 32 for calling the CanvasBackend obj's underlying member method code with example usage: obj._modifiers(pygletmod) and returns: mod