code: def _exec(obj):
      # exec on PyQt6, exec_ elsewhere.
      obj.exec() if hasattr(obj, "exec") else obj.exec_()
  
file_path: matplotlib/lib/matplotlib/backends/qt_compat.py
imports: import operator
  import os
  import platform
  import sys
  from packaging.version import parse
  import matplotlib
  from .None import _QT_FORCE_QT5_BINDING
label_desc: Use image node_id 2 for calling a global function with example usage: _exec(obj) without return types