code: def verify(token, key, algorithms, verify=True):
      
  
      header, payload, signing_input, signature = _load(token)
  
      if verify:
          _verify_signature(signing_input, header, signature, key, algorithms)
  
      return payload
docs: Verifies a JWS string's signature.
  
      Args:
          token (str): A signed JWS to be verified.
          key (str or dict): A key to attempt to verify the payload with. Can be
              individual JWK or JWK set.
          algorithms (str or list): Valid algorithms that should be used to verify the JWS.
  
      Returns:
          str: The str representation of the payload, assuming the signature is valid.
  
      Raises:
          JWSError: If there is an exception verifying a token.
  
      Examples:
  
          >>> token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhIjoiYiJ9.jiMyrsmD8AoHWeQgmxZ5yq8z0lXS67_QGs52AzC8Ru8'
          >>> jws.verify(token, 'secret', algorithms='HS256')