code: def findContours(*args, **kwargs):
      
      if cv2.__version__.startswith('4'):
          contours, hierarchy = cv2.findContours(*args, **kwargs)
      elif cv2.__version__.startswith('3'):
          _, contours, hierarchy = cv2.findContours(*args, **kwargs)
      else:
          raise AssertionError(
              'cv2 must be either version 3 or 4 to call this method')
  
      return contours, hierarchy
docs: Wraps cv2.findContours to maintain compatiblity between versions
      3 and 4
  
      Returns:
          contours, hierarchy