code: def heatmap_seaborn(dfr, outfilename=None, title=None, params=None):
      
      # Decide on figure layout size: a minimum size is required for
      # aesthetics, and a maximum to avoid core dumps on rendering.
      # If we hit the maximum size, we should modify font size.
      maxfigsize = 120
      calcfigsize = dfr.shape[0] * 1.1
      figsize = min(max(8, calcfigsize), maxfigsize)
      if figsize == maxfigsize:
          scale = maxfigsize / calcfigsize
          sns.set_context("notebook", font_scale=scale)
  
      # Add a colorbar?
      if params.classes is None:
          col_cb = None
      else:
          col_cb = get_seaborn_colorbar(dfr, params.classes)
  
      # Labels are defined before we build the clustering
      # If a label mapping is missing, use the key text as fall back
      params.labels = get_safe_seaborn_labels(dfr, params.labels)
  
      # Add attributes to parameter object, and draw heatmap
      params.colorbar = col_cb
      params.figsize = figsize
      params.linewidths = 0.25
      fig = get_seaborn_clustermap(dfr, params, title=title)
  
      # Save to file
      if outfilename:
          fig.savefig(outfilename)
  
      # Return clustermap
      return fig
docs: Returns seaborn heatmap with cluster dendrograms.
  
      - dfr - pandas DataFrame with relevant data
      - outfilename - path to output file (indicates output format)