code: def plot_dependence_heatmap(
      D,
      color_threshold=0.6,
      threshold=0.03,
      cmap=None,
      figsize=None,
      value_fontsize=8,
      label_fontsize=9,
      precision=2,
      xrot=70,
      grid=True,
  ):
      depdata = D.values.astype(float)
  
      ncols, nrows = depdata.shape
      if figsize:
          fig = plt.figure(figsize=figsize)
      colnames = list(D.columns.values)
      colnames[0] = "$\\bf " + colnames[0] + "$"  # bold Dependence word
      plt.xticks(
          range(len(colnames)),
          colnames,
          rotation=xrot,
          horizontalalignment="right",
          fontsize=label_fontsize,
          color=GREY,
      )
      plt.yticks(
          range(len(colnames[1:])),
          colnames[1:],
          verticalalignment="center",
          fontsize=label_fontsize,
          color=GREY,
      )
      if cmap is None:
          cw = plt.get_cmap("coolwarm")
          cmap = ListedColormap(
              [cw(x) for x in np.arange(color_threshold, 0.85, 0.01)]
          )
      elif isinstance(cmap, str):
          cmap = plt.get_cmap(cmap)
      cm = copy(cmap)
      cm.set_under(color="white")
  
      for x in range(ncols):
          for y in range(nrows):
              if (x + 1) == y or depdata[x, y] < threshold:
                  depdata[x, y] = 0
  
      if grid:
          plt.grid(True, which="major", alpha=0.25)
  
      im = plt.imshow(
          depdata,
          cmap=cm,
          vmin=color_threshold,
          vmax=1.0,
          aspect="equal",
      )
      cb = plt.colorbar(
          im,
          fraction=0.046,
          pad=0.04,
          ticks=[
              color_threshold,
              color_threshold + (1 - color_threshold) / 2,
              1.0,
          ],
      )
      cb.ax.tick_params(
          labelsize=label_fontsize, labelcolor=GREY, pad=0
      )
      cb.outline.set_edgecolor("white")
  
      plt.axvline(x=0.5, lw=1, color=GREY)
  
      for x in range(ncols):
          for y in range(nrows):
              if (x + 1) == y:
                  plt.annotate(
                      "x",
                      xy=(y, x),
                      horizontalalignment="center",
                      verticalalignment="center",
                      fontsize=value_fontsize,
                      color=GREY,
                  )
              if (x + 1) != y and not np.isclose(
                  round(depdata[x, y], precision), 0.0
              ):
                  plt.annotate(
                      myround(depdata[x, y], precision),
                      xy=(y, x),
                      horizontalalignment="center",
                      verticalalignment="center",
                      fontsize=value_fontsize,
                      color=GREY,
                  )
      plt.tick_params(pad=0, axis="x", which="both")
  
      ax = plt.gca()
      ax.spines["top"].set_linewidth(0.3)
      ax.spines["right"].set_linewidth(0.3)
      ax.spines["left"].set_linewidth(1)
      ax.spines["left"].set_edgecolor(GREY)
      ax.spines["bottom"].set_linewidth(0.3)
  
      plt.tight_layout()
      return PimpViz()
  
imports: import pandas
  import numpy
  import matplotlib.pyplot
  import sklearn
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.ensemble import RandomForestRegressor
  from distutils.version import LooseVersion
  from sklearn.model_selection import cross_val_score
  from sklearn.base import clone
  from sklearn.metrics import r2_score
  from sklearn.metrics import f1_score
  from sklearn.preprocessing import LabelEncoder
  from scipy import stats
  from pandas.api.types import is_numeric_dtype
  from matplotlib.colors import ListedColormap
  from matplotlib.ticker import FormatStrFormatter
  from copy import copy
  import warnings
  import tempfile
  from os import getpid, makedirs
label_desc: Use image node_id 19 for calling a global function with example usage: plot_dependence_heatmap(D, color_threshold, threshold, cmap, figsize, value_fontsize, label_fontsize, precision, xrot, grid) and returns: PimpViz