Fix perplexity
This pull request **fixes 1 alert** when merging 95dfdd4e791577dfdcef46bb40b29ea6fc654767 into 1ac828df423fbcec1b34c650b3a20266bb133dde - [view on LGTM.com](https://lgtm.com/projects/g/NVIDIA/NeMo/rev/pr-49f4b5e0cd5f2f08dc1ab6bb582037306b47e847)

**fixed alerts:**

* 1 for Unused import
Fix for issue https://github.com/NVIDIA/NeMo/issues/1289 . Move code to the branch in the original repo for easier collaboration with @yzhang123 