def add_nodes(self, num_nodes, extra_args=None, *, rpchost=None, binary=None):
    'Instantiate TestNode objects'
    if (extra_args is None):
        extra_args = ([[]] * num_nodes)
    if self.options.legacywallet:
        for arg in extra_args:
            arg.append('-legacywallet')
        self.log.info('Running test with legacy (pre-HD) wallet')
    if (binary is None):
        binary = ([None] * num_nodes)
    assert_equal(len(extra_args), num_nodes)
    assert_equal(len(binary), num_nodes)
    for i in range(num_nodes):
        self.nodes.append(TestNode(i, self.options.tmpdir, extra_args[i], rpchost, timewait=self.rpc_timewait, binary=binary[i], stderr=None, mocktime=self.mocktime, coverage_dir=self.options.coveragedir, use_cli=self.options.usecli))
Instantiate TestNode objects
def add_nodes(self, num_nodes, extra_args=None, *, rpchost=None, binary=None):
    
    if (extra_args is None):
        extra_args = ([[]] * num_nodes)
    if self.options.legacywallet:
        for arg in extra_args:
            arg.append('-legacywallet')
        self.log.info('Running test with legacy (pre-HD) wallet')
    if (binary is None):
        binary = ([None] * num_nodes)
    assert_equal(len(extra_args), num_nodes)
    assert_equal(len(binary), num_nodes)
    for i in range(num_nodes):
        self.nodes.append(TestNode(i, self.options.tmpdir, extra_args[i], rpchost, timewait=self.rpc_timewait, binary=binary[i], stderr=None, mocktime=self.mocktime, coverage_dir=self.options.coveragedir, use_cli=self.options.usecli))