code: def correct_rotation(bbox, page):
      # bbox base is (x0, y0, x1, y1)
      rotation = page.rotation
      if rotation == 0:
          return bbox
  
      tl = pymupdf.Point(bbox[0], bbox[1]) * page.rotation_matrix
      br = pymupdf.Point(bbox[2], bbox[3]) * page.rotation_matrix
      if rotation == 90:
          bbox = [br[0], tl[1], tl[0], br[1]]
      elif rotation == 180:
          bbox = [br[0], br[1], tl[0], tl[1]]
      elif rotation == 270:
          bbox = [tl[0], br[1], br[0], tl[1]]
  
      return bbox
  
file_path: pdf-to-markdown/marker/bbox.py
imports: import fitz
label_desc: Use image node_id 8 for calling a global function with example usage: correct_rotation(bbox, page) and returns: bbox, bbox