code: def _decrypt_verify_with_context(ctx, encrypted):
      
      try:
          (plaintext, _, verify_result) = ctx.decrypt(
                  encrypted, verify=True)
          sigs = verify_result.signatures
      except gpg.errors.GPGMEError as e:
          raise GPGProblem(str(e), code=e.getcode())
      except gpg.errors.BadSignatures as e:
          (plaintext, _, _) = ctx.decrypt(encrypted, verify=False)
          sigs = e.result.signatures
      return sigs, plaintext
docs: Decrypts the given ciphertext string using the gpg context
      and returns both the signatures (if any) and the plaintext.
  
      :param gpg.Context ctx: the gpg context
      :param bytes encrypted: the mail to decrypt
      :returns: the signatures and decrypted plaintext data
      :rtype: tuple[list[gpg.resuit.Signature], str]
      :raises alot.errors.GPGProblem: if the decryption fails