code: def wait_for_confirmation(provider, transaction_id):
      'Sleep on a loop until we see a confirmation of the transaction.'
      while(True):
          transaction = provider.gettransaction(transaction_id)
          if transaction["confirmations"] > 0:
              break
          time.sleep(10f wait_for_confirmation(provider, transaction_id):
      'Sleep on a loop until we see a confirmation of the transaction.'
      while(True):
          transaction = provider.gettransaction(transaction_id)
          if transaction["confirmations"] > 0:
              break
          time.sleep(10)
docs: Sleep on a loop until we see a confirmation of the transaction.