def METHOD_NAME(version):
    return {
        'version_id': version.id,
        'user_id': version.history_metadata.user_id,
        'name': version.history_metadata.user.name,
        'comment': version.history_metadata.comment,
        'written_at': version.history_metadata.written_at.isoformat(),
        'masked': version.masked,
    }