code: def corners_to_center_format(x):
      """
      Converts a NumPy array of bounding boxes of shape (number of bounding boxes, 4) of corners format (x_0, y_0, x_1,
      y_1) to center format (center_x, center_y, width, height).
      """
      x_transposed = x.T
      x0, y0, x1, y1 = (
          x_transposed[0],
          x_transposed[1],
          x_transposed[2],
          x_transposed[3],
      )
      b = [(x0 + x1) / 2, (y0 + y1) / 2, (x1 - x0), (y1 - y0)]
      return np.stack(b, axis=-1)
  
imports: import io
  import pathlib
  import warnings
  from collections import defaultdict
  from typing import Dict, List, Optional, Set, Tuple, Union
  import numpy
  from PIL import Image
  from ...feature_extraction_utils import BatchFeature, FeatureExtractionMixin
  from ...image_utils import ImageFeatureExtractionMixin, is_torch_tensor
  from ...utils import TensorType, is_torch_available, logging
label_desc: Use image node_id 2 for calling a global function with example usage: corners_to_center_format(x) and returns: np