Select which trees to use for the pergola. A conventional pergola shape is square, but any shape can be made, provided the trees are close enough together.
Measure the wooden canes against the distance between the selected trees. Store-bought pergola posts are 6 feet apart, so roughly estimate the distance between the selected trees. The cane is long enough if the ends fit between the branches or overlap the tree trunk.
Bind the wooden cane at each end around the tree's trunk. It does not matter whether you knot or bind with the garden twine. Safety is important, so make sure the cane is bound securely. If you require a square shape, bind another cane between two opposite trees.
Make sure the garden twine will comfortably hold the weight of the canes. The tree's foliage will provide a natural roof for the pergola, but more wooden canes bound across the top in the opposite direction will help with strength and enclosure.