code: def heatmap(
      data,
      row_labels,
      col_labels,
      ax=None,
      cbar_kw=None,
      cbarlabel="",
      **kwargs,
  ):
      """
      Create a heatmap from a numpy array and two lists of labels.
  
      Parameters
      ----------
      data
          A 2D numpy array of shape (M, N).
      row_labels
          A list or array of length M with the labels for the rows.
      col_labels
          A list or array of length N with the labels for the columns.
      ax
          A `matplotlib.axes.Axes` instance to which the heatmap is plotted.  If
          not provided, use current Axes or create a new one.  Optional.
      cbar_kw
          A dictionary with arguments to `matplotlib.Figure.colorbar`.  Optional.
      cbarlabel
          The label for the colorbar.  Optional.
      **kwargs
          All other arguments are forwarded to `imshow`.
      """
  
      if ax is None:
          ax = plt.gca()
  
      if cbar_kw is None:
          cbar_kw = {}
  
      # Plot the heatmap
      im = ax.imshow(data, **kwargs)
  
      # Create colorbar
      cbar = ax.figure.colorbar(im, ax=ax, **cbar_kw)
      cbar.ax.set_ylabel(cbarlabel, rotation=-90, va="bottom")
  
      # Show all ticks and label them with the respective list entries.
      ax.set_xticks(np.arange(data.shape[1]), labels=col_labels)
      ax.set_yticks(np.arange(data.shape[0]), labels=row_labels)
  
      # Let the horizontal axes labeling appear on top.
      ax.tick_params(
          top=True, bottom=False, labeltop=True, labelbottom=False
      )
  
      # Rotate the tick labels and set their alignment.
      plt.setp(
          ax.get_xticklabels(),
          rotation=-30,
          ha="right",
          rotation_mode="anchor",
      )
  
      # Turn spines off and create white grid.
      ax.spines[:].set_visible(False)
  
      ax.set_xticks(np.arange(data.shape[1] + 1) - 0.5, minor=True)
      ax.set_yticks(np.arange(data.shape[0] + 1) - 0.5, minor=True)
      ax.grid(which="minor", color="w", linestyle="-", linewidth=3)
      ax.tick_params(which="minor", bottom=False, left=False)
  
      return im, cbar
  
imports: import matplotlib.pyplot
  import numpy
  import matplotlib
  import matplotlib
label_desc: Use image node_id 1 for calling a global function with example usage: heatmap(data, row_labels, col_labels, ax, cbar_kw, cbarlabel) and returns: im,  cbar