code: def get_bboxes_for_region(page, region):
      bboxes = []
      merged_box = None
      for idx in region:
          block = page.blocks[idx]
          bbox = block.bbox
          if merged_box is None:
              merged_box = bbox
          else:
              merged_box = merge_boxes(merged_box, bbox)
          bboxes.append(bbox)
      return bboxes, merged_box
  
imports: import io
  from copy import deepcopy
  from functools import partial
  from typing import List
  import torch
  from texify.inference import batch_inference
  from texify.model.model import load_model
  from texify.model.processor import load_processor
  import re
  from PIL import Image, ImageDraw
  from marker.bbox import should_merge_blocks, merge_boxes
  from marker.debug.data import dump_equation_debug_data
  from marker.settings import settings
  from marker.schema import Page, Span, Line, Block, BlockType
  import os
label_desc: Use image node_id 7 for calling a global function with example usage: get_bboxes_for_region(page, region) and returns: bboxes,  merged_box