code: def heatmap(
      df,
      filter=None,
      n=0,
      p=0,
      sort=None,
      figsize=(20, 12),
      fontsize=16,
      labels=True,
      label_rotation=45,
      cmap="RdBu",
      vmin=-1,
      vmax=1,
      cbar=True,
      ax=None,
  ):
      """
      Presents a `seaborn` heatmap visualization of nullity correlation in the given DataFrame.
  
      Note that this visualization has no special support for large datasets. For those, try the dendrogram instead.
  
      :param df: The DataFrame whose completeness is being heatmapped.
      :param filter: The filter to apply to the heatmap. Should be one of "top", "bottom", or None (default). See
          `nullity_filter()` for more information.
      :param n: The cap on the number of columns to include in the filtered DataFrame. See  `nullity_filter()` for
          more information.
      :param p: The cap on the percentage fill of the columns in the filtered DataFrame. See  `nullity_filter()` for
          more information.
      :param sort: The column sort order to apply. Can be "ascending", "descending", or None.
      :param figsize: The size of the figure to display. This is a `matplotlib` parameter which defaults to (20, 12).
      :param fontsize: The figure's font size.
      :param labels: Whether or not to label each matrix entry with its correlation (default is True).
      :param label_rotation: What angle to rotate the text labels to. Defaults to 45 degrees.
      :param cmap: What `matplotlib` colormap to use. Defaults to `RdBu`.
      :param vmin: The normalized colormap threshold. Defaults to -1, e.g. the bottom of the color scale.
      :param vmax: The normalized colormap threshold. Defaults to 1, e.g. the bottom of the color scale.
      :return: The plot axis.
      """
      # Apply filters and sorts, set up the figure.
      df = nullity_filter(df, filter=filter, n=n, p=p)
      df = nullity_sort(df, sort=sort, axis="rows")
  
      if ax is None:
          plt.figure(figsize=figsize)
          ax0 = plt.gca()
      else:
          ax0 = ax
  
      # Remove completely filled or completely empty variables.
      df = df.iloc[
          :,
          [
              i
              for i, n in enumerate(np.var(df.isnull(), axis="rows"))
              if n > 0
          ],
      ]
  
      # Create and mask the correlation matrix. Construct the base heatmap.
      corr_mat = df.isnull().corr()
      mask = np.zeros_like(corr_mat)
      mask[np.triu_indices_from(mask)] = True
  
      if labels:
          sns.heatmap(
              corr_mat,
              mask=mask,
              cmap=cmap,
              ax=ax0,
              cbar=cbar,
              annot=True,
              annot_kws={"size": fontsize - 2},
              vmin=vmin,
              vmax=vmax,
          )
      else:
          sns.heatmap(
              corr_mat,
              mask=mask,
              cmap=cmap,
              ax=ax0,
              cbar=cbar,
              vmin=vmin,
              vmax=vmax,
          )
  
      # Apply visual corrections and modifications.
      ax0.xaxis.tick_bottom()
      ax0.set_xticklabels(
          ax0.xaxis.get_majorticklabels(),
          rotation=label_rotation,
          ha="right",
          fontsize=fontsize,
      )
      ax0.set_yticklabels(
          ax0.yaxis.get_majorticklabels(), rotation=0, fontsize=fontsize
      )
      ax0.xaxis.set_ticks_position("none")
      ax0.yaxis.set_ticks_position("none")
      ax0.patch.set_visible(False)
  
      for text in ax0.texts:
          t = float(text.get_text())
          if 0.95 <= t < 1:
              text.set_text("<1")
          elif -1 < t <= -0.95:
              text.set_text(">-1")
          elif t == 1:
              text.set_text("1")
          elif t == -1:
              text.set_text("-1")
          elif -0.05 < t < 0.05:
              text.set_text("")
          else:
              text.set_text(round(t, 1))
  
      return ax0
  
file_path: missingno/missingno/missingno.py
imports: import numpy
  import matplotlib
  from matplotlib import gridspec
  import matplotlib.pyplot
  from scipy.cluster import hierarchy
  import seaborn
  import pandas
  from .utils import nullity_filter, nullity_sort
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: heatmap(df, filter, n, p, sort, figsize, fontsize, labels, label_rotation, cmap, vmin, vmax, cbar, ax) and returns: ax0