code: def _delay_until_retry(exc, deadline):
      
      cause = exc.errors[0]
  
      now = time.time()
  
      if now >= deadline:
          raise
  
      delay = _get_retry_delay(cause)
      if delay is not None:
  
          if now + delay > deadline:
              raise
  
          time.sleep(delay)
docs: Helper for :meth:`Session.run_in_transaction`.
  
      Detect retryable abort, and impose server-supplied delay.
  
      :type exc: :class:`google.api_core.exceptions.Aborted`
      :param exc: exception for aborted transaction
  
      :type deadline: float
      :param deadline: maximum timestamp to continue retrying the transaction.