Post #160:  and use this code for it (replace pie menu name and bone name):
open_menu('Your Pie Menu Name') if C.object.data.bones['bone.001'].select else None