code: def rot90_boxes(
      boxes: NdarrayTensor,
      spatial_size: Sequence[int] | int,
      k: int = 1,
      axes: tuple[int, int] = (0, 1),
  ) -> NdarrayTensor:
      """
      Rotate boxes by 90 degrees in the plane specified by axes.
      Rotation direction is from the first towards the second axis.
  
      Args:
          boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``
          spatial_size: image spatial size.
          k : number of times the array is rotated by 90 degrees.
          axes: (2,) array_like
              The array is rotated in the plane defined by the axes. Axes must be different.
  
      Returns:
          A rotated view of `boxes`.
  
      Notes:
          ``rot90_boxes(boxes, spatial_size, k=1, axes=(1,0))``  is the reverse of
          ``rot90_boxes(boxes, spatial_size, k=1, axes=(0,1))``
          ``rot90_boxes(boxes, spatial_size, k=1, axes=(1,0))`` is equivalent to
          ``rot90_boxes(boxes, spatial_size, k=-1, axes=(0,1))``
      """
      spatial_dims: int = get_spatial_dims(boxes=boxes)
      spatial_size_ = list(ensure_tuple_rep(spatial_size, spatial_dims))
  
      axes = ensure_tuple(axes)
  
      if len(axes) != 2:
          raise ValueError("len(axes) must be 2.")
  
      if axes[0] == axes[1] or abs(axes[0] - axes[1]) == spatial_dims:
          raise ValueError("Axes must be different.")
  
      if (
          axes[0] >= spatial_dims
          or axes[0] < -spatial_dims
          or axes[1] >= spatial_dims
          or axes[1] < -spatial_dims
      ):
          raise ValueError(
              f"Axes={axes} out of range for array of ndim={spatial_dims}."
          )
  
      k %= 4
  
      if k == 0:
          return boxes
      if k == 2:
          return flip_boxes(
              flip_boxes(boxes, spatial_size_, axes[0]),
              spatial_size_,
              axes[1],
          )
  
      if k == 1:
          boxes_ = flip_boxes(boxes, spatial_size_, axes[1])
          return swapaxes_boxes(boxes_, axes[0], axes[1])
      else:
          # k == 3
          boxes_ = swapaxes_boxes(boxes, axes[0], axes[1])
          spatial_size_[axes[0]], spatial_size_[axes[1]] = (
              spatial_size_[axes[1]],
              spatial_size_[axes[0]],
          )
          return flip_boxes(boxes_, spatial_size_, axes[1])
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from copy import deepcopy
  import numpy
  import torch
  from monai.config.type_definitions import DtypeLike, NdarrayOrTensor, NdarrayTensor
  from monai.data.box_utils import COMPUTE_DTYPE, TO_REMOVE, get_spatial_dims
  from monai.transforms import Resize
  from monai.transforms.utils import create_scale
  from monai.utils import look_up_option
  from monai.utils.misc import ensure_tuple, ensure_tuple_rep
  from monai.utils.type_conversion import convert_data_type, convert_to_dst_type
label_desc: Use image node_id 10 for calling a global function with example usage: rot90_boxes(boxes, spatial_size, k, axes) and returns: boxes, flip_boxes, swapaxes_boxes, flip_boxes