Not sure if you know this or not, but blender has a naming feature. I use it all the time, because I’m Lazy. So I just name normal(Thigh, shin, upperarm, forearm, hand, foot, etc) then select the bones right click->Names->Auto name Left/Right. Then I right click->Symmetrize.
Note: I sent request to acces your script.