code: def box_centers(boxes: NdarrayOrTensor) -> NdarrayOrTensor:
      """
      Compute center points of boxes
  
      Args:
          boxes: bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``
  
      Returns:
          center points with size of (N, spatial_dims)
  
      """
      spatial_dims = get_spatial_dims(boxes=boxes)
      return convert_box_mode(
          boxes=boxes, src_mode=StandardMode, dst_mode=CenterSizeMode
      )[:, :spatial_dims]
  
imports: from __future__ import annotations
  import inspect
  import warnings
  from abc import ABC, abstractmethod
  from collections.abc import Callable, Sequence
  from copy import deepcopy
  import numpy
  import torch
  from monai.config.type_definitions import NdarrayOrTensor, NdarrayTensor
  from monai.utils import look_up_option
  from monai.utils.enums import BoxModeName
  from monai.utils.type_conversion import convert_data_type, convert_to_dst_type
label_desc: Use image node_id 6 for calling a global function with example usage: box_centers(boxes) and returns: convert_box_mode