code: def calculate_coordinates(self, x1, x2, y1, y2):
      if x1 < x2:
          xmin = x1
          xmax = x2
      else:
          xmin = x2
          xmax = x1
      if y1 < y2:
          ymin = y1
          ymax = y2
      else:
          ymin = y2
          ymax = y1
      width = xmax - xmin
      if width < 0:
          width = width * -1
      height = ymax - ymin
      # x and y from center of rect
      x = xmin + width / 2
      y = ymin + height / 2
      return height, width, x, y
  
file_path: PaddleOCR/PPOCRLabel/libs/create_ml_io.py
imports: import json
  from pathlib import Path
  from libs.constants import DEFAULT_ENCODING
  import os
label_desc: Use image node_id 3 for calling the CreateMLWriter obj's underlying member method code with example usage: obj.calculate_coordinates(x1, x2, y1, y2) and returns: height,  width,  x,  y