code: def _corners_to_center_format_torch(
      bboxes_corners: "torch.Tensor",
  ) -> "torch.Tensor":
      (
          top_left_x,
          top_left_y,
          bottom_right_x,
          bottom_right_y,
      ) = bboxes_corners.unbind(-1)
      b = [
          (top_left_x + bottom_right_x) / 2,  # center x
          (top_left_y + bottom_right_y) / 2,  # center y
          (bottom_right_x - top_left_x),  # width
          (bottom_right_y - top_left_y),  # height
      ]
      return torch.stack(b, dim=-1)
  
imports: import warnings
  from typing import Iterable, List, Optional, Tuple, Union
  import numpy
  from .image_utils import ChannelDimension, ImageInput, get_channel_dimension_axis, get_image_size, infer_channel_dimension_format
  from .utils import ExplicitEnum, TensorType, is_jax_tensor, is_tf_tensor, is_torch_tensor
  from .utils.import_utils import is_flax_available, is_tf_available, is_torch_available, is_vision_available, requires_backends
label_desc: Use image node_id 13 for calling a global function with example usage: _corners_to_center_format_torch(bboxes_corners) and returns: torch