def METHOD_NAME(
    room_version: RoomVersion,
    event_dict: JsonDict,
    signature_name: str,
    signing_key: SigningKey,
) -> None:
    """Add content hash and sign the event
    Args:
        room_version: the version of the room this event is in
        event_dict: The event to add hashes to and sign
        signature_name: The name of the entity signing the event
            (typically the server's hostname).
        signing_key: The key to sign with
    """
    name, digest = compute_content_hash(event_dict, hash_algorithm=hashlib.sha256)
    event_dict.setdefault("hashes", {})[name] = encode_base64(digest)
    event_dict["signatures"] = compute_event_signature(
        room_version, event_dict, signature_name=signature_name, signing_key=signing_key
    )