code: def draw_brace(ax, xspan, text):
      """Draws an annotated brace on the axes."""
      # https://stackoverflow.com/a/53383764/1889400
      xmin, xmax = xspan
      xspan = xmax - xmin
      ax_xmin, ax_xmax = ax.get_xlim()
      xax_span = ax_xmax - ax_xmin
      ymin, ymax = ax.get_ylim()
      yspan = ymax - ymin
      resolution = (
          int(xspan / xax_span * 100) * 2 + 1
      )  # guaranteed uneven
      beta = (
          300.0 / xax_span
      )  # the higher this is, the smaller the radius
  
      x = np.linspace(xmin, xmax, resolution)
      x_half = x[: resolution // 2 + 1]
      y_half_brace = 1 / (
          1.0 + np.exp(-beta * (x_half - x_half[0]))
      ) + 1 / (1.0 + np.exp(-beta * (x_half - x_half[-1])))
      y = np.concatenate((y_half_brace, y_half_brace[-2::-1]))
      y = ymin + (0.05 * y - 0.01) * yspan  # adjust vertical position
  
      ax.autoscale(False)
      ax.plot(x, y, color="black", lw=3)
  
      ax.text(
          (xmax + xmin) / 2,
          ymin + 0.07 * yspan,
          text,
          ha="center",
          va="bottom",
          fontsize=20,
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: draw_brace(ax, xspan, text) without return types