def _prepare_versions(listen_versions, supported_versions):
    """Return listen versions."""
    assert supported_versions
    if not listen_versions:
        return supported_versions
    unsupported = set(listen_versions) - set(supported_versions)
    if unsupported:
        raise ValueError('Unsupported OpenFlow versions: %r' % unsupported)
    return listen_versions
