def _get_fcv_and_version_if_allowed(
    client: pymongo.MongoClient,
) -> Tuple[Version, Version]:
    """Fetches the current FCV and server version, if we have permission to
    read the ``admin`` database.

    Args:
        client: a ``pymongo.MongoClient`` to connect to the database

    Returns:
        a tuple of

        -   a ``Version`` of the FCV, or ``None`` if not allowed
        -   a ``Version`` of the server version, or ``None`` if not allowed

    Raises:
        ConnectionError: if a connection to ``mongod`` could not be established
    """
    try:
        current_version = client.admin.command(
            {"getParameter": 1, "featureCompatibilityVersion": 1}
        )
        current_fcv = Version(
            current_version["featureCompatibilityVersion"]["version"]
        )
        server_version = Version(client.server_info()["version"])
        return current_fcv, server_version
    except ServerSelectionTimeoutError as e:
        raise ConnectionError("Could not connect to `mongod`") from e
    except:
        logger.debug(
            "Skipping feature compatibility version check. This action "
            "requires read access of the 'admin' database"
        )
        return None, None
Fetches the current FCV and server version, if we have permission to
    read the ``admin`` database.

    Args:
        client: a ``pymongo.MongoClient`` to connect to the database

    Returns:
        a tuple of

        -   a ``Version`` of the FCV, or ``None`` if not allowed
        -   a ``Version`` of the server version, or ``None`` if not allowed

    Raises:
        ConnectionError: if a connection to ``mongod`` could not be established
    
fiftyone/core/odm/database.py