code: def create_keyboard_patches(firstnote, lastnote, ax=None):
      import matplotlib.pyplot as plt
      from matplotlib.path import Path
      import matplotlib.patches as mpatches
  
      blacks, whites, b_width, w_width = get_keyboard_edges(
          firstnote, lastnote
      )
  
      if not ax:
          fig = plt.figure()
          ax = fig.add_subplot(111)
  
      verts, codes = [], []
      for white in whites:
          verts += [
              (white - w_width, 0),
              (white - w_width, 1),
              (white + w_width, 1),
              (white + w_width, 0),
          ]
          verts += [(white - w_width, 0)]
          codes += [Path.MOVETO] + [Path.LINETO] * 4
      path = Path(verts, codes)
      patch = mpatches.PathPatch(
          path, facecolor="white", edgecolor="black", lw=1
      )
      ax.add_patch(patch)
  
      verts, codes = [], []
      for black in blacks:
          verts += [
              (black - b_width, 0.33),
              (black - b_width, 1),
              (black + b_width, 1),
              (black + b_width, 0.33),
          ]
          verts += [(black - b_width, 0.33)]
          codes += [Path.MOVETO] + [Path.LINETO] * 4
      path = Path(verts, codes)
      patch = mpatches.PathPatch(
          path, facecolor="black", edgecolor="black", lw=1
      )
      ax.add_patch(patch)
  
      ax.axis(xmin=firstnote, xmax=lastnote)
  
label_desc: Use image node_id 2 for calling a global function with example usage: create_keyboard_patches(firstnote, lastnote, ax) without return types