def METHOD_NAME(secret_key: str):
    # encrypts contents
    class OtherData(BaseModel):
        foo: int = 123
    my_secret_key = secret_key.encode()
    my_invitation_code = _fernet_encrypt_as_urlsafe_code(
        data=OtherData().json().encode(), secret_key=my_secret_key
    )
    with pytest.raises(ValidationError):
        decrypt_invitation(
            invitation_code=my_invitation_code,
            secret_key=my_secret_key,
        )
    with pytest.raises(InvalidInvitationCode):
        extract_invitation_content(
            invitation_code=my_invitation_code,
            secret_key=my_secret_key,
        )