code: def box_xyxy_to_cxcywh(x: "torch.Tensor"):
      """
      From DETR source: https://github.com/facebookresearch/detr
      (detr/util/box_ops.py)
      """
  
      x_0, y_0, x_1, y_1 = x.unbind(-1)
      box = [(x_0 + x_1) / 2, (y_0 + y_1) / 2, (x_1 - x_0), (y_1 - y_0)]
      return torch.stack(box, dim=-1)
  
imports: from typing import List, Optional, Tuple, Union
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: box_xyxy_to_cxcywh(x) and returns: torch