code: def draw_rectangle(draw, coordinates, color, width=1, fill=30):
      """Draw a rectangle with an optional width."""
      # Add alphas to the color so we have a small overlay over the object.
      fill = color + (fill,)
      outline = color + (255,)
  
      # Pillow doesn't support width in rectangles, so we must emulate it with a
      # loop.
      for i in range(width):
          coords = [
              coordinates[0] - i,
              coordinates[1] - i,
              coordinates[2] + i,
              coordinates[3] + i,
          ]
  
          # Fill must be drawn only for the first rectangle, or the alphas will
          # add up.
          if i == 0:
              draw.rectangle(coords, fill=fill, outline=outline)
          else:
              draw.rectangle(coords, outline=outline)
  
file_path: luminoth/luminoth/vis.py
imports: import numpy
  import sys
  from PIL import Image, ImageDraw, ImageFont
label_desc: Use image node_id 4 for calling a global function with example usage: draw_rectangle(draw, coordinates, color, width, fill) without return types