//  [python]
def _information_gain_comparison_heatmap(dataset, datasets=None, feature=None, max_features=None, multiclass=False,
                                         aggregate="byte_[0-9]+_after_ep", **kw):
    """ Plot a heatmap with the diffferences of information gain between a reference dataset (Dataset instance) and the
         given list of datasets (by name). """
    #FIXME: remove temp coode [START]
    import matplotlib
    #Create the style of the font 
    font = {'family' : 'serif',
            'weight' : 'normal',
            'size'   : 10}         
    matplotlib.rc('font', **font) #set the font style created
    #FIXME: remove temp coode [END]
    from ...helpers.figure import plt  # report to get the actual object (cfr lazy loading)
    from sklearn.feature_selection import mutual_info_classif as mic
    from sklearn.preprocessing import Imputer
    l = dataset.logger
    datasets_feats = {dataset.basename: dataset._data.copy()}
    for ds in (datasets or []):
        datasets_feats[ds.name] = ds._data.copy()
    feature = filter_features(dataset, feature or "*")
    df = pd.concat(datasets_feats.values(), keys=datasets_feats.keys(), names=['experiment', 'hash'])
    df = df[df['label'] != NOT_LABELLED]
    df = filter_data(df, feature=feature)
    #fct = [lambda x: pd.Series(mic(x[feature].astype('float'), x['label'] == NOT_PACKED), index=feature),
    #       lambda x: pd.Series(mic(x[feature].astype('float'), x['label']), index=feature)][multiclass]
    df[feature] = Imputer(missing_values=np.nan, strategy="mean").fit_transform(df[feature])
    df = df.groupby('experiment').apply(lambda x: pd.Series(mic(x[feature].astype('float'), x['label'], random_state=42), index=feature))
    df = (df - df.loc[dataset.basename]).apply(abs)
    df = df.drop(index=dataset.basename)
    if max_features in [None, 0] or max_features > len(feature):
        max_features = len(feature)
    if aggregate is not None:
        to_group = list(df.columns.str.extract("(" + aggregate + ")", expand=False).dropna())
        df[aggregate + "_mean"] = df[to_group].mean(axis=1)
        df = df.drop(to_group, axis=1)
        if max_features > df.shape[1]:
            max_features = df.shape[1]
    order = sorted(sorted(df.columns, key=lambda x: df[x].mean())[-max_features:],
                   key=lambda x: df[x].mean())[::-1]
    # normalize per column
    df[order] = df[order].div(df[order].max(axis=0), axis=1)
    label = f"Normalized IG difference from reference dataset"
    title = f"Information Gain comparison with reference dataset {dataset.basename}"
    plt.figure(figsize=(1.2*len(df.index) + 3, round(0.25 * max_features + 2.2)), dpi=200)
    annotations = df[order].applymap(lambda x: "%.2f"%x if abs(x) < 1000 else "%.1e"%x).values.T
    ax = seaborn.heatmap(data=df[order].values.T, annot=annotations, fmt="s", xticklabels=df.index, yticklabels=order,
                         cmap="YlOrBr", linewidth=0, cbar_kws={'location': 'right', 'ticks': [0,1], 'label': label},
                         vmin=0, vmax=1)
    ax.xaxis.tick_top()
    plt.title(title, fontfamily="serif", fontsize=16, fontweight="bold", pad=14)
    plt.xticks(fontsize=12)
    plt.yticks(fontsize=10)
    plt.tight_layout()
    dataset._temp_df = df
    return f"{dataset.basename}/infogain-compare/{'-'.join(datasets_feats)}"