matplotlib.patches.
draw_bbox
This is a debug function to draw a rectangle around the bounding box returned by get_window_extent() of an artist, to test whether the artist is returning the correct bbox.
get_window_extent()