code: def convert_keypoint_from_albumentations(
      keypoint: Sequence,
      target_format: str,
      rows: int,
      cols: int,
      check_validity: bool = False,
      angle_in_degrees: bool = True,
  ) -> Tuple:
      if target_format not in keypoint_formats:
          raise ValueError(
              "Unknown target_format {}. Supported formats are: {}".format(
                  target_format, keypoint_formats
              )
          )
  
      (x, y, angle, scale), tail = keypoint[:4], tuple(keypoint[4:])
      angle = angle_to_2pi_range(angle)
      if check_validity:
          check_keypoint((x, y, angle, scale), rows, cols)
      if angle_in_degrees:
          angle = math.degrees(angle)
  
      kp: Tuple
      if target_format == "xy":
          kp = (x, y)
      elif target_format == "yx":
          kp = (y, x)
      elif target_format == "xya":
          kp = (x, y, angle)
      elif target_format == "xys":
          kp = (x, y, scale)
      elif target_format == "xyas":
          kp = (x, y, angle, scale)
      elif target_format == "xysa":
          kp = (x, y, scale, angle)
      else:
          raise ValueError(
              f"Invalid target format. Got: {target_format}"
          )
  
      return kp + tail
  
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 6 for calling a global function with example usage: convert_keypoint_from_albumentations(keypoint, target_format, rows, cols, check_validity, angle_in_degrees) and returns: unknown