def spend_inputs(self, node_id, inputs, outputs):
    ' auxiliary function used by spend_utxo / spend_utxos '
    assert_greater_than(len(self.nodes), node_id)
    rpc_conn = self.nodes[node_id]
    spendingTx = rpc_conn.createrawtransaction(inputs, outputs)
    spendingTx_signed = rpc_conn.signrawtransaction(spendingTx)
    if spendingTx_signed['complete']:
        txhash = rpc_conn.sendrawtransaction(spendingTx_signed['hex'])
        return txhash
    else:
        return ''
auxiliary function used by spend_utxo / spend_utxos
def spend_inputs(self, node_id, inputs, outputs):
    '  '
    assert_greater_than(len(self.nodes), node_id)
    rpc_conn = self.nodes[node_id]
    spendingTx = rpc_conn.createrawtransaction(inputs, outputs)
    spendingTx_signed = rpc_conn.signrawtransaction(spendingTx)
    if spendingTx_signed['complete']:
        txhash = rpc_conn.sendrawtransaction(spendingTx_signed['hex'])
        return txhash
    else:
        return 