This is a semi-automatic regex text replacement (excluding files in the test_framework/ directory):
(dis)?connect_nodes\(self\.nodes\[(\d)\], self\.nodes\[(\d)\]\) --> self.$1connect_nodes($2, $3)
This is a backport of core#19967 [2/3]
https://github.com/bitcoin/bitcoin/pull/19967/commits/4b16c614616c1ff09e5b1dcd58516bcb9a88e5e8