code: def is_on_same_line(box_a, box_b, min_y_overlap_ratio=0.8):
      # TODO Check if it should be deleted after ocr.py refactored
      """Check if two boxes are on the same line by their y-axis coordinates.
  
      Two boxes are on the same line if they overlap vertically, and the length
      of the overlapping line segment is greater than min_y_overlap_ratio * the
      height of either of the boxes.
  
      Args:
          box_a (list), box_b (list): Two bounding boxes to be checked
          min_y_overlap_ratio (float): The minimum vertical overlapping ratio
                                      allowed for boxes in the same line
  
      Returns:
          The bool flag indicating if they are on the same line
      """
      a_y_min = np.min(box_a[1::2])
      b_y_min = np.min(box_b[1::2])
      a_y_max = np.max(box_a[1::2])
      b_y_max = np.max(box_b[1::2])
  
      # Make sure that box a is always the box above another
      if a_y_min > b_y_min:
          a_y_min, b_y_min = b_y_min, a_y_min
          a_y_max, b_y_max = b_y_max, a_y_max
  
      if b_y_min <= a_y_max:
          if min_y_overlap_ratio is not None:
              sorted_y = sorted([b_y_min, b_y_max, a_y_max])
              overlap = sorted_y[1] - sorted_y[0]
              min_a_overlap = (a_y_max - a_y_min) * min_y_overlap_ratio
              min_b_overlap = (b_y_max - b_y_min) * min_y_overlap_ratio
              return (
                  overlap >= min_a_overlap or overlap >= min_b_overlap
              )
          else:
              return True
      return False
  
file_path: mmocr/mmocr/utils/bbox_utils.py
imports: from typing import List, Tuple
  import numpy
  from shapely.geometry import LineString, Point
  from mmocr.utils.check_argument import is_type_list
  from mmocr.utils.point_utils import point_distance, points_center
  from mmocr.utils.typing_utils import ArrayLike
label_desc: Use image node_id 4 for calling a global function with example usage: is_on_same_line(box_a, box_b, min_y_overlap_ratio) and returns: False, unknown, True