code: def _draw_transparent_box_on_handler(draw, block, color, alpha):
      if hasattr(block, "points"):
          vertices = [tuple(block) for block in block.points.tolist()]
      else:
          vertices = cvt_coordinates_to_points(block.coordinates)
  
      draw.polygon(
          vertices,
          _get_color_rgb(color, alpha),
      )
  
imports: from typing import List, Optional, Union, Dict, Any, Tuple, Dict
  import functools
  import os
  import sys
  from itertools import cycle
  import numpy
  from PIL import Image, ImageFont, ImageDraw, ImageColor
  import layoutparser
  from .elements import Layout, Interval, Rectangle, TextBlock, Quadrilateral
  from .elements.utils import cvt_coordinates_to_points
label_desc: Use image node_id 8 for calling a global function with example usage: _draw_transparent_box_on_handler(draw, block, color, alpha) without return types