code: def check_opencv_version(major, lib=None):
      # this function may be removed in a future release as we now
      # use the get_opencv_major_function to obtain the current OpenCV
      # version and then perform the actual version check *within* the
      # respective function
      import warnings
  
      message = """
          The check_opencv_version function is deprecated and may be
          removed in a future release. Use at your own risk.
      """
      warnings.warn(message, DeprecationWarning, stacklevel=2)
  
      # if the supplied library is None, import OpenCV
      if lib is None:
          import cv2 as lib
  
      # return whether or not the current OpenCV version matches the
      # major version number
      return lib.__version__.startswith(major)
  
file_path: imutils/imutils/convenience.py
imports: import numpy
  import cv2
  import sys
label_desc: Use image node_id 14 for calling a global function with example usage: check_opencv_version(major, lib) and returns: lib