Honestly it just all depends on the snakes individual personality whether it's going to take to the "petting" and know you're safe, or whether the action will annoy the snake. Either are possible, all I can offer up is my own experience with my 2 snakes. I generally always kind of "stroked" the bp with my thumb while I hold, kind of like petting, and I guess they both took to accepting it. However, I also give them a "pet" before I take them out, just so they know it's me, so maybe they associate being petted with "time to com out and play"? Who knows.
For what it's worth my new Lil guy seemed to understand instantly that gently petting meant it was ok to unball and relax.