This is a riff that is played over a 1-6-2-5 chord progression. In G that is G-E7-A7-D7. Try starting the riff on the D string instead of the A string to transpose to the key of Fmaj. Changes being F-D7-G7-C7. This 1-6-2-5 is in many tunes including in the B part of Sweet Georgia Brown which I have recorded as a backtrack you can play along too. The turnaround comes at the end of the B-part leading back into the intro of the song. Have fun, make variations of your own and let me know if you have any questions.
Try this or your own variation to it