This NSO package contains an action "check_version" as an example of code to check the version of a Cisco device with Cisco NSO
This is the example package presented in this tutorial: https://community.cisco.com/t5/nso-developer-hub-blogs/using-nso-actions-to-check-operational-state-with-pyats-parsers/ba-p/4545172