code: def custom_box_style(x0, y0, width, height, mutation_size):
      """
      Given the location and size of the box, return the path of the box around
      it. Rotation is automatically taken care of.
  
      Parameters
      ----------
      x0, y0, width, height : float
         Box location and size.
      mutation_size : float
      Mutation reference scale, typically the text font size.
      """
      # padding
      mypad = 0.3
      pad = mutation_size * mypad
      # width and height with padding added.
      width = width + 2 * pad
      height = height + 2 * pad
      # boundary of the padded box
      x0, y0 = x0 - pad, y0 - pad
      x1, y1 = x0 + width, y0 + height
      # return the new path
      return Path(
          [
              (x0, y0),
              (x1, y0),
              (x1, y1),
              (x0, y1),
              (x0 - pad, (y0 + y1) / 2),
              (x0, y0),
              (x0, y0),
          ],
          closed=True,
      )
  
file_path: matplotlib/galleries/users_explain/text/annotations.py
imports: import matplotlib.pyplot
  import numpy
  import matplotlib.patches
  from matplotlib.path import Path
  from matplotlib.offsetbox import AnchoredText
  from matplotlib.patches import Circle
  from mpl_toolkits.axes_grid1.anchored_artists import AnchoredDrawingArea
  from matplotlib.patches import Ellipse
  from mpl_toolkits.axes_grid1.anchored_artists import AnchoredAuxTransformBox
  from matplotlib.offsetbox import AnchoredOffsetbox, DrawingArea, HPacker, TextArea
  from matplotlib.text import OffsetFrom
  from matplotlib.patches import ConnectionPatch
label_desc: Use image node_id 1 for calling a global function with example usage: custom_box_style(x0, y0, width, height, mutation_size) and returns: Path