Need guidance for a python script where I am using pose estimation JSON output to create the pose on human rig

From the MMPOSE got 3D key points in JSON and now am trying to apply this pose on human rig in Maya. Current approach is calculating the rotation of each bone from T-pose (in a sense)

Just need general guidance from anyone who has done this before on what is the best way to do this.