Need help for m2 (World of Warcraft file) import

Is possible to you check the following python code and find why the animations are not working. Thank you in advance!

Character for testing proposes:

Pura Vida!

More Information:

Before looking into this, Id like to know if this code ever worked, or did it break in a newer version of blender?