Set type for "nodes".
Summary:
I noticed that navigation in PyCharm/VS Code did not work for nodes variable. I think this is frustrating, especially for newcomers.
This will make python IDEs work better with the test framework.
Our code already switched to python 3.6 types hints for chain and setup_clean_chain, so the only change for these attributes is to remove Optional.
This is a backport of core#20954
Test Plan: ninja check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10949