This sample file shows how you can create these mock-3d worm/tube designs by using gradient-filled circles densely repeated along free-form paths. It show how you can use the Path repeater to repeat elements along a path and also works as an introduction to how you can use one layer (the path in this case) to control the output in another (the repeated gradient worm).
As an exercise, try adding an Group Apply function node to the gradient worms to have them vary along the path for some fun effects.

