What is the shape of the candy cane, so popular at Christmas time, modeled after?

A shepard’s crook, making it most convenient to hang on your Christmas tree.