How to add text in a node in the example "Pipe"?

I want to set some label to the node(Pipe element), but it failed to add go.TextBox in nodetemplate? How can i do make node display a text and this text can be edited?

The node template in the Pipes sample, Pipes, consists of a Node Panel holding a Shape and a variable number of ports:

    Node, "Spot"
        Shape
        port
        port
        . . .

where each port is a Panel containing a Shape.

I suggest that you wrap that in another Spot Node Panel containing the above Panel and a TextBlock.

    Node, "Spot"  // new panel
        Panel, "Spot"  // old panel
            Shape
            port
            port
            . . .
        TextBlock

You’ll need to move some of the properties and Bindings that apply only to the Part and Node classes up to the new Node Panel, out of the old Node Panel.