Helper method to read a configuration file according to the 'configparser' format, and return it as a dictionary
    of dictionaries [section > [property > value]].

    :param file_object:
    :return:

def config_to_dict_of_dict(desired_type: Type[T], config: ConfigParser, logger: Logger,
                           conversion_finder: ConversionFinder, **kwargs) -> DictOfDict:
    """
    Helper method to read a configuration file according to the 'configparser' format, and return it as a dictionary
    of dictionaries [section > [property > value]].

    :param file_object:
    :return:
    """
    # return dict(config)

    # get the base collection type if provided
    base_typ, discarded = _extract_collection_base_type(desired_type, exception_if_none=False)
    # if none, at least declare dict
    base_typ = base_typ or Dict

    # convert the whole config to a dictionary by flattening all sections. If a key is found twice in two different
    # sections an error is raised
    results = dict()
    for section, props in config.items():
        # convert all values of the sub-dictionary
        results[section] = ConversionFinder.convert_collection_values_according_to_pep(props, base_typ,
                                                                                       conversion_finder, logger,
                                                                                       **kwargs)

    return results