raw_msg = "This is my secret message"
msg = hashlib.sha512(raw_msg.encode("utf-8")).digest()
People misunderstood this sha512 call as part of the signature, where it's just a way to compress the input to 512bits. We should make it clear that EdDSA does not make use of sha512.
cc @stefandeml