code: def verify_ed25519_signature(public_key, contents, signature, message):
      
      try:
          public_key.verify(signature, contents)
      except InvalidSignature as exc:
          raise ScriptWorkerEd25519Error(message % {'exc': str(exc)})
docs: Verify that ``signature`` comes from ``public_key`` and ``contents``.
  
      Args:
          public_key (Ed25519PublicKey): the key to verify the signature
          contents (bytes): the contents that was signed
          signature (bytes): the signature to verify
          message (str): the error message to raise.
  
      Raises:
          ScriptWorkerEd25519Error: on failure