Solution
Go to github link here and you can see some python code examples for NI Digital Pattern instrument.

Additionally, you can also find many other python code examples here for NI hardware, such as DC Power, DMM, FGEN, Scope, Switch, and more.

You can use "Download" button in github to get the source code or use other tool like SourceTree to download them.
Also, you can click here below to get them in NI Digital Pattern Module Examples
