I need reconstruct constrains of my skinning human rag doll please help me

I create a skinned human rag doll for my GAME but can’t spawn with logic bricks cause lost Copy Location and Copy Rotation constrains of all bones of armature

there have 15 rigid bodies objects and 15 bones in armature.

Can anybody give example of just set one bone constrain here for i repeat to my human rag doll?

import bge
import constrains

rigidbody1 = scene.objects['head']
rigidbody15 = scene.objects['hand_left']

armature = scene.objects['armature']

target_object = rigidbody1
sel_bone = armature.pose.bones["head"]

And now I need to add a bone constraint for selected_bone to copy rotation and copy location of target_object. Does python API have such method?

please look my video of ragdoll skinned the front is original ragdoll and back is instanced group not work.i just need spawn this simple model.logic bricks lost constrains with group and instance group not work.