def text_listing(props, dim, fun, is_fun_single_prop=False, d_configs="\n\n\n", fun_config_header=None):
    """Returns a text listing of values computed for the specified configs. By default follows a format
    similar to the presented below:

    (*) CONFIG: c1
    vals_c1

    (*) CONFIG: c2
    vals_c2

    .....

    :param props: (dict) all properties files containing experiment's data.
    :param dim: (Dim) dimension along which listing will be created.
    :param fun: (list[dict] => str) function returning text containing processed information (e.g. average)
     for a config-filtered props.
    :param is_fun_single_prop: (bool) if true, then to fun will be passed separately every config-filtered
     prop (e.g. useful for printing best solutions per config). If false, then to fun will be passed whole
     set of config-filtered props (e.g. useful for printing statistics).
    :param d_configs: (str) delimiter between configs in the listing.
    :param fun_config_header: (Config => str) Function which returns text of the header describing a configuration.
    :return: (str) Text of a listing.
    """
    if fun_config_header is None:
        fun_config_header = lambda c: "(*) CONFIG: {0}\n".format(c.get_caption())

    text = ""
    for config in dim:
        text += fun_config_header(config)
        filtered = config.filter_props(props)
        if is_fun_single_prop:
            for p in filtered:
                text += fun(p)
        else:
            text += str(fun(filtered))
        text += d_configs
    return text