Annotations with border and rounded corner

Hey guys,

Is there a simple way to add annotations with a border whose corners would be rounded, on a figure?

Eg of an annotation with standard rectangular border:

fig=go.Figure()
fig.add_annotation(    
    yref="paper", xref="x", x=0.5, y=0.5, text="some text to display",
    showarrow=True, align="center", arrowhead=2, arrowsize=1, arrowwidth=1,
    ax=0, ay=5, borderwidth=0.5, borderpad=2, bordercolor="black",
    yanchor="top", bgcolor="pink", font=dict(color="black", weight="bold", size=10)
)
fig.show()

When inspecting the doc we see this:

<g class="annotation-text-g" transform="rotate(0,403.64,555)">
<g class="cursor-pointer" transform="translate(359,547)">
<rect class="bg" x="0.25" y="0.25" width="89.5" height="15.5" style="stroke-width: 0.5px; stroke: rgb(0, 0, 0); stroke-opacity: 1; fill: rgb(255, 192, 203); fill-opacity: 1;"></rect>
<text class="annotation-text" text-anchor="middle" data-unformatted="some text to display" data-math="N" x="44.5810546875" y="11.2998046875" style="font-family: LardySerif-Regular; font-size: 10px; fill: rgb(0, 0, 0); fill-opacity: 1; font-weight: bold; font-style: normal; font-variant: normal; white-space: pre;">some text to display</text>
</g>
</g>

The desired output would be this:

<g class="annotation-text-g" transform="rotate(0,403.64,555)">
<g class="cursor-pointer" transform="translate(359,547)">
<rect class="bg" x="0.25" y="0.25" width="89.5" height="15.5" style="stroke-width: 0.5px; stroke: rgb(0, 0, 0); stroke-opacity: 1; fill: rgb(255, 192, 203); fill-opacity: 1;" rx="10" ry="10"></rect>
<text class="annotation-text" text-anchor="middle" data-unformatted="some text to display" data-math="N" x="44.5810546875" y="11.2998046875" style="font-family: LardySerif-Regular; font-size: 10px; fill: rgb(0, 0, 0); fill-opacity: 1; font-weight: bold; font-style: normal; font-variant: normal; white-space: pre;">some text to display</text>
</g>
</g>

But, for this, we would need:

  1. an option to pass rx and ry value to the .fig_annotation, used when there is a border around the text. Maybe in relative terms instead of px ? (like, % of height or % of font size + vertical padding?)
  2. an option to adjust the horizontal padding a bit too. Currently we only have “borderpad”, whose value seems applied to the top, bottom, left and right padding values.

Is it better to use add_shape with “label”, and define a SVG path of some kind ? Anyone ever tried to add annotations whose borders would have rounded corners?