def METHOD_NAME(hello_data: dict[str, Any]) -> set[SyncVersion]:
    """Versions that are not recognized will not be included."""
    if settings.CAPABILITY_SYNC_VERSION in hello_data['capabilities']:
        if 'sync_versions' not in hello_data:
            raise HathorError('protocol error, expected sync_versions field')
        known_values = set(x.value for x in SyncVersion)
        recognized_values = set(hello_data['sync_versions']) & known_values
        return set(SyncVersion(x) for x in recognized_values)
    else:
        # XXX: implied value when sync-version capability isn't present
        return {SyncVersion.V1}