Refactor nrm2 and test_nrm2

Details:
- Refactor nrm2 and test_nrm2
- Minor documentation changes