code: def rotation2DMatrixToEulerAngles(
      matrix: np.ndarray, y_up: bool = False
  ) -> float:
      """
      Args:
          matrix (np.ndarray): Rotation matrix
          y_up (bool): is Y axis looks up or down
      """
      if y_up:
          return np.arctan2(matrix[1, 0], matrix[0, 0])
      return np.arctan2(-matrix[1, 0], matrix[0, 0])
  
imports: import math
  from typing import List, Optional, Sequence, Tuple, Union
  import cv2
  import numpy
  import skimage.transform
  from scipy.ndimage import gaussian_filter
  from albumentations.augmentations.utils import _maybe_process_in_chunks, angle_2pi_range, clipped, preserve_channel_dim, preserve_shape
  from ...None import random_utils
  from ...core.bbox_utils import denormalize_bbox, normalize_bbox
  from ...core.transforms_interface import BoxInternalType, FillValueType, ImageColorType, KeypointInternalType
label_desc: Use image node_id 19 for calling a global function with example usage: rotation2DMatrixToEulerAngles(matrix, y_up) and returns: np, np