code: def _draw_rect(
      ax, b, color="white", text=None, text_size=14, hw=True, rev=False
  ):
      lx, ly, w, h = b
      if rev:
          lx, ly, w, h = ly, lx, h, w
      if not hw:
          w, h = w - lx, h - ly
      patch = ax.add_patch(
          patches.Rectangle(
              (lx, ly), w, h, fill=False, edgecolor=color, lw=2
          )
      )
      _draw_outline(patch, 4)
      if text is not None:
          patch = ax.text(
              lx,
              ly,
              text,
              verticalalignment="top",
              color=color,
              fontsize=text_size,
              weight="bold",
          )
          _draw_outline(patch, 1)
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  from PIL import Image
  from matplotlib import patches, patheffects
label_desc: Use image node_id 14 for calling a global function with example usage: _draw_rect(ax, b, color, text, text_size, hw, rev) without return types