code: def _normalized_to_pixel_coordinates(
      normalized_x: float,
      normalized_y: float,
      image_width: int,
      image_height: int,
  ) -> Union[None, Tuple[int, int]]:
      """Converts normalized value pair to pixel coordinates."""
  
      # Checks if the float value is between 0 and 1.
      def is_valid_normalized_value(value: float) -> bool:
          return (value > 0 or math.isclose(0, value)) and (
              value < 1 or math.isclose(1, value)
          )
  
      if not (
          is_valid_normalized_value(normalized_x)
          and is_valid_normalized_value(normalized_y)
      ):
          # TODO: Draw coordinates even if it's outside of the image bounds.
          return None
      x_px = min(
          math.floor(normalized_x * image_width), image_width - 1
      )
      y_px = min(
          math.floor(normalized_y * image_height), image_height - 1
      )
      return x_px, y_px
  
file_path: mediapipe/mediapipe/python/solutions/drawing_utils.py
imports: import dataclasses
  import math
  from typing import List, Mapping, Optional, Tuple, Union
  import cv2
  import matplotlib.pyplot
  import numpy
  from mediapipe.framework.formats import detection_pb2
  from mediapipe.framework.formats import landmark_pb2
  from mediapipe.framework.formats import location_data_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: _normalized_to_pixel_coordinates(normalized_x, normalized_y, image_width, image_height) and returns: x_px,  y_px, unknown, None