code: def Verify(self, message, signature, hash_algorithm=None):
      
      # This method accepts both PSS and PKCS1v15 padding. PSS is preferred but
      # old clients only support PKCS1v15.
  
      if hash_algorithm is None:
        hash_algorithm = hashes.SHA256()
  
      last_e = None
      for padding_algorithm in [
          padding.PSS(
              mgf=padding.MGF1(hash_algorithm),
              salt_length=padding.PSS.MAX_LENGTH),
          padding.PKCS1v15()
      ]:
        try:
          self._value.verify(signature, message, padding_algorithm,
                             hash_algorithm)
          return True
  
        except exceptions.InvalidSignature as e:
          last_e = e
  
      raise VerificationError(last_e)
docs: Verifies a given message.