An example is worth a thousand words. Here's some pointers to various solutions and examples available today.
Automation/Code Exchange
DevNet Automation Exchange has lots of useful examples related to network automation in general.
Search for pyATS under Test & Validation section.
Examples:
GitHub Repos
- virlutils - bring up a Cisco VIRL testbed, generates the pyATS testbed YAML, and launch pyATS scripts
- pyATS Script Examples - out-of-the-box examples on how pyATS works
- pyATS Solutions - various solutions and examples by the user community
- Unicon Platform Plugins - plugins for connecting to different platforms and etc