code: def resize_bbox(
      box, image_w=None, image_h=None, default_wh=VOCAB_IMAGE_W
  ):
      ratio_w = image_w * 1.0 / default_wh
      ratio_h = image_h * 1.0 / default_wh
  
      new_box = [
          int(box[0] * ratio_w),
          int(box[1] * ratio_h),
          int(box[2] * ratio_w),
          int(box[3] * ratio_h),
      ]
      return new_box
  
imports: import argparse
  import datetime
  import json
  import os
  import time
  import gradio
  import requests
  from ferret.conversation import default_conversation, conv_templates, SeparatorStyle
  from ferret.constants import LOGDIR
  from ferret.utils import build_logger, server_error_msg, violates_moderation, moderation_msg
  import hashlib
  import re
  from copy import deepcopy
  from PIL import ImageDraw, ImageFont
  from gradio import processing_utils
  import numpy
  import torch
  import torch.nn.functional
  from scipy.ndimage import binary_dilation, binary_erosion
  import pdb
  from ferret.serve.gradio_css import code_highlight_css
label_desc: Use image node_id 13 for calling a global function with example usage: resize_bbox(box, image_w, image_h, default_wh) and returns: new_box