code: def get_key_point(
      detection: detection_pb2.Detection, key_point_enum: "FaceKeyPoint"
  ) -> Union[None, location_data_pb2.LocationData.RelativeKeypoint]:
      """A convenience method to return a face key point by the FaceKeyPoint type.
  
      Args:
        detection: A detection proto message that contains face key points.
        key_point_enum: A FaceKeyPoint type.
  
      Returns:
        A RelativeKeypoint proto message.
      """
      if not detection or not detection.location_data:
          return None
      return detection.location_data.relative_keypoints[key_point_enum]
  
file_path: mediapipe/mediapipe/python/solutions/face_detection.py
imports: import enum
  from typing import NamedTuple, Union
  import numpy
  from mediapipe.framework.formats import detection_pb2
  from mediapipe.framework.formats import location_data_pb2
  from mediapipe.modules.face_detection import face_detection_pb2
  from mediapipe.python.solution_base import SolutionBase
label_desc: Use image node_id 1 for calling a global function with example usage: get_key_point(detection, key_point_enum) and returns: detection, None