code: def is_same_line(box1, box2):
      """
      Params:
          box1: [x1, y1, x2, y2]
          box2: [x1, y1, x2, y2]
      """
  
      box1_midy = (box1[1] + box1[3]) / 2
      box2_midy = (box2[1] + box2[3]) / 2
  
      if (
          box1_midy < box2[3]
          and box1_midy > box2[1]
          and box2_midy < box1[3]
          and box2_midy > box1[1]
      ):
          return True
      else:
          return False
  
imports: from typing import List, Union, Any, Tuple, Optional
  import requests
  import torch
  from langchain.docstore.document import Document
  from langchain.document_loaders import ImageCaptionLoader
  import numpy
  from utils import get_device, clear_torch_cache, NullContext
  from doctr.utils.common_types import AbstractFile
label_desc: Use image node_id 2 for calling a global function with example usage: is_same_line(box1, box2) and returns: True, False