def _evaluate_features(features_name: list, features_index: list, config_features_available: bool):
    """
    This ensures that (1) if feature names are provided in the config file, one and only one of the
    arguments, `features_name` or `features_index`, might be given, and (2) if feature names are
    NOT provided in the config file, one and only one of the arguments MUST be given.
    :param features_name: See the same argument in `do_extraction`.
    :param features_index: See the same argument in `do_extraction`.
    :param config_features_available: `True` if the key `STATISTICAL_FEATURES` in the config file,
           is associated with a list of features, and `False` otherwise.

    :return: True, if no exception was raised.
    """
    if features_index is None: features_index = []
    if features_name is None: features_name = []
    given_by_list, given_by_index = False, False
    if len(features_name) > 0:
        given_by_list = True
    if len(features_index) > 0:
        given_by_index = True

    if not config_features_available:  # if features in config file are not provided
        if given_by_list and not given_by_index:
            return True
        else:
            # if (1) both args are given, or (2) if none of them are provided, or (3) if
            # params_index is given
            raise ValueError(
                """
                If a list of feature names is not provided by the config file, 
                the arg `features_name` and only that MUST be given.
                """
            )
    else:
        if given_by_list + given_by_index > 1:  # if both args are provided
            raise ValueError(
                """
                Both of the arguments, `features_name` and `features_index`, cannot be given at the 
                same time.
                """
            )
    return True