code: def get_state(obj, picklable=False):
      typ = obj.type()
      if isinstance(typ, int):
          # PyQt6 returns an int here instead of QEvent.Type,
          # but its QtGui.QMouseEvent constructor takes only QEvent.Type.
          # Note however that its QtCore.QEvent constructor accepts both
          # QEvent.Type and int.
          typ = QtCore.QEvent.Type(typ)
      lpos = (
          obj.position() if hasattr(obj, "position") else obj.localPos()
      )
      gpos = (
          obj.globalPosition()
          if hasattr(obj, "globalPosition")
          else obj.screenPos()
      )
      btn, btns, mods = obj.button(), obj.buttons(), obj.modifiers()
      if picklable:
          typ, btn, btns, mods = serialize_mouse_enum(
              typ, btn, btns, mods
          )
      return typ, lpos, gpos, btn, btns, mods
  
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 MouseEvent obj's underlying member method code with example usage: obj.get_state(obj, picklable) and returns: typ,  lpos,  gpos,  btn,  btns,  mods