code: def _setup_pyqt4():
      global QtCore, QtGui, QtWidgets, __version__, is_pyqt5, _getSaveFileName
  
      def _setup_pyqt4_internal(api):
          global QtCore, QtGui, QtWidgets, __version__, is_pyqt5, _getSaveFileName
          # List of incompatible APIs:
          # http://pyqt.sourceforge.net/Docs/PyQt4/incompatible_apis.html
          _sip_apis = [
              "QDate",
              "QDateTime",
              "QString",
              "QTextStream",
              "QTime",
              "QUrl",
              "QVariant",
          ]
          try:
              import sip
          except ImportError:
              pass
          else:
              for _sip_api in _sip_apis:
                  try:
                      sip.setapi(_sip_api, api)
                  except ValueError:
                      pass
          from PyQt4 import QtCore, QtGui
  
          __version__ = QtCore.PYQT_VERSION_STR
          # PyQt 4.6 introduced getSaveFileNameAndFilter:
          # https://riverbankcomputing.com/news/pyqt-46
          if __version__ < LooseVersion("4.6"):
              raise ImportError("PyQt<4.6 is not supported")
          QtCore.Signal = QtCore.pyqtSignal
          QtCore.Slot = QtCore.pyqtSlot
          QtCore.Property = QtCore.pyqtProperty
          _getSaveFileName = QtGui.QFileDialog.getSaveFileNameAndFilter
  
      if QT_API == QT_API_PYQTv2:
          _setup_pyqt4_internal(api=2)
      elif QT_API == QT_API_PYSIDE:
          from PySide import (
              QtCore,
              QtGui,
              __version__,
              __version_info__,
          )
  
          # PySide 1.0.3 fixed the following:
          # https://srinikom.github.io/pyside-bz-archive/809.html
          if __version_info__ < (1, 0, 3):
              raise ImportError("PySide<1.0.3 is not supported")
          _getSaveFileName = QtGui.QFileDialog.getSaveFileName
      elif QT_API == QT_API_PYQT:
          _setup_pyqt4_internal(api=1)
      else:
          raise ValueError(
              "Unexpected value for the 'backend.qt4' rcparam"
          )
      QtWidgets = QtGui
  
      def is_pyqt5():
          return False
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/backends/qt_compat.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from distutils.version import LooseVersion
  import os
  import sys
  from matplotlib import rcParams
label_desc: Use image node_id 2 for calling a global function with example usage: _setup_pyqt4() and returns: False