def is_in_transaction(self, app_id, txid, retries=5):
    if self.needs_connection or not self.handle.connected:
      self.reestablish_connection()

    tx_lock_path = self.get_transaction_lock_list_path(app_id, txid)
    if self.is_blacklisted(app_id, txid):
      raise ZKTransactionException(
        'Transaction {} is blacklisted'.format(txid))
    try:
      if not self.run_with_retry(self.handle.exists, tx_lock_path):
        logging.debug("[is_in_transaction] {0} does not exist".format(
          tx_lock_path))
        return False
      logging.debug("{0} does exist and is not blacklisted".format(
        tx_lock_path))
      return True
    except kazoo.exceptions.KazooException as kazoo_exception:
      logging.exception(kazoo_exception)
      if retries > 0:
        logging.info('Trying again to see if we are in transaction {} '
          'with retry #{}'.format(txid, retries))
        time.sleep(self.ZK_RETRY_TIME)
        return self.is_in_transaction(app_id=app_id, txid=txid,
          retries=retries - 1)
      self.reestablish_connection()
      raise ZKInternalException("Couldn't see if we are in transaction {0}" \
        .format(txid))
Check dependencies, user ID and other stuff
dataset/ETHPy150Open AppScale/appscale/AppDB/zkappscale/zktransaction.py/ZKTransaction.is_in_transaction--crossover with--dataset/ETHPy150Open jgilhutton/pyxiewps_WPShack-Python/pyxiewps-EN.py/Engine.check