code: def get_state(obj, picklable=False):
      # {PyQt6, PySide6}      have position()
      # {PyQt5, PySide2} 5.15 have position()
      # {PyQt5, PySide2} 5.15 have posF() (contrary to C++ docs)
      # {PyQt5, PySide2} 5.12 have posF()
      lpos = obj.position() if hasattr(obj, "position") else obj.posF()
      gpos = (
          obj.globalPosition()
          if hasattr(obj, "globalPosition")
          else obj.globalPosF()
      )
      pixdel, angdel, btns = (
          obj.pixelDelta(),
          obj.angleDelta(),
          obj.buttons(),
      )
      mods, phase, inverted = (
          obj.modifiers(),
          obj.phase(),
          obj.inverted(),
      )
      if picklable:
          btns, mods, phase = serialize_mouse_enum(btns, mods, phase)
      return lpos, gpos, pixdel, angdel, btns, mods, phase, inverted
  
imports: from ..Qt import QT_LIB, QtCore, QtGui, QtWidgets
  import atexit
  import enum
  import mmap
  import os
  import sys
  import tempfile
  from ..None import Qt
  from ..None import CONFIG_OPTIONS
  from ..None import multiprocess
  from .GraphicsView import GraphicsView
label_desc: Use image node_id 1 for calling the WheelEvent obj's underlying member method code with example usage: obj.get_state(obj, picklable) and returns: lpos,  gpos,  pixdel,  angdel,  btns,  mods,  phase,  inverted