code: def build_cascade(model_name="haarcascade") -> Any:
      """
      Build a opencv face&eye detector models
      Returns:
          model (Any)
      """
      opencv_path = get_opencv_path()
      if model_name == "haarcascade":
          face_detector_path = (
              opencv_path + "haarcascade_frontalface_default.xml"
          )
          if os.path.isfile(face_detector_path) != True:
              raise ValueError(
                  "Confirm that opencv is installed on your environment! Expected path ",
                  face_detector_path,
                  " violated.",
              )
          detector = cv2.CascadeClassifier(face_detector_path)
  
      elif model_name == "haarcascade_eye":
          eye_detector_path = opencv_path + "haarcascade_eye.xml"
          if os.path.isfile(eye_detector_path) != True:
              raise ValueError(
                  "Confirm that opencv is installed on your environment! Expected path ",
                  eye_detector_path,
                  " violated.",
              )
          detector = cv2.CascadeClassifier(eye_detector_path)
  
      else:
          raise ValueError(
              f"unimplemented model_name for build_cascade - {model_name}"
          )
  
      return detector
  
file_path: deepface/deepface/detectors/OpenCvWrapper.py
imports: import os
  from typing import Any
  import cv2
  import numpy
  from deepface.detectors import FaceDetector
label_desc: Use image node_id 2 for calling a global function with example usage: build_cascade(model_name) and returns: detector