code: def check_keypoint(kp: Sequence, rows: int, cols: int) -> None:
      """Check if keypoint coordinates are less than image shapes"""
      for name, value, size in zip(["x", "y"], kp[:2], [cols, rows]):
          if not 0 <= value < size:
              raise ValueError(
                  "Expected {name} for keypoint {kp} "
                  "to be in the range [0.0, {size}], got {value}.".format(
                      kp=kp, name=name, value=value, size=size
                  )
              )
  
      angle = kp[2]
      if not (0 <= angle < 2 * math.pi):
          raise ValueError(
              "Keypoint angle must be in range [0, 2 * PI). Got: {angle}".format(
                  angle=angle
              )
          )
  
imports: from __future__ import division
  import math
  import typing
  import warnings
  from typing import Any, Dict, List, Optional, Sequence, Tuple
  from .utils import DataProcessor, Params
label_desc: Use image node_id 2 for calling a global function with example usage: check_keypoint(kp, rows, cols) without return types