def METHOD_NAME(self) -> str:
    data = apischema.serialize(self)
    # We add a newline at the end so that one can easily compute the checksum
    # using common tools e.g.
    #
    #   grep -v checksum state-file | sha256sum
    #   jq --indent 4 'del(.checksum)' state-file | sha256sum
    serialized = json.dumps(data, indent=4) + "\n"
    return hashlib.sha256(serialized.encode("utf-8")).digest().hex()