How to add text to a shape?

Is there a way to add text to a shape? For example, say I created a rectangle on a go.Scatter thusly,

fig.add_shape(
        go.layout.Shape(
            name = "blueShape",
            type="rect",
            xref = "x",
            yref = "y",
            x0=0,
            y0=7,
            x1=1,
            y1=8
        ))

would there be a way to has some text bounded by the rectangle?

Thanks!