How to add border to butt-capped line

Hi all! I am working on adding stroke around lines in matplotlib. Currently I am playing around with the patheffects implemented in matplotlib. I have posted this question on stackoverflow as well (see this post).