code: def plot_inner_token_rankings(
      input_tokens,
      output_tokens,
      rankings,
      vmin: int = 2,
      vmax: int = 5000,
      show_inputs: Optional[bool] = False,
      save_file_path: Optional[str] = None,
      **kwargs,
  ):
      n_columns = len(input_tokens)
      n_rows = rankings.shape[0]
      fsize = (
          1 + 0.9 * n_columns,  # Make figure wider if more columns
          1 + 0.4 * n_rows,
      )  # Make taller if more layers
  
      fig, (ax, cax) = plt.subplots(
          nrows=1,
          ncols=2,
          figsize=fsize,
          gridspec_kw={"width_ratios": [n_columns, 0.5]},
      )
      plt.subplots_adjust(wspace=0.1)
      fig.set_facecolor("w")
      # ax = plt.gca()
  
      cmap_big = get_cmap("RdPu_r", 512)
  
      newcmp = ListedColormap(cmap_big(np.linspace(0.40, 0.90, 256)))
      v = copy.copy(newcmp)
      v.set_under("#9a017b")
      v.set_over("white")
  
      v.set_bad("white")
  
      comma_fmt = FuncFormatter(lambda x, p: format(int(x), ","))
  
      # print(vmin, vmax)
      norm = mpl.colors.LogNorm(vmin=vmin, vmax=vmax)
      g = sns.heatmap(
          rankings,
          # mask=token_found_mask[:,start_token:],
          cmap=v,
          fmt="d",
          ax=ax,
          annot=rankings,
          cbar=False,
          norm=norm,
          linewidths=0.5,
          linecolor="#f0f0f0",
          annot_kws={"size": 12},
      )
  
      fig.colorbar(
          ax.get_children()[0],
          cax=cax,
          format=comma_fmt,
          extend="both",
          orientation="vertical",
          label="Ranking of token (by score)",
      )
  
      ax.tick_params(axis="x", which="major", labelsize=18)
  
      plt.tick_params(
          axis="x",  # changes apply to the x-axis
          which="both",  # both major and minor ticks are affected
          left=False,  # ticks along the bottom edge are off
          bottom=True,  # ticks along the bottom edge are off
          top=False,  # ticks along thx top edge are off
          labeltop=False,
          labelbottom=True,
      )  # labels along the bottom edge are off
  
      # Output token labels at the bottom
      ax.set_xticklabels(output_tokens, rotation=-90)
      ax.set_xlabel("Output Token", fontsize=14)
  
      # Layer names label at the left
      ylabels = ["Layer {}".format(n) for n in range(rankings.shape[0])]
      ax.set_yticklabels(ylabels, fontsize=14, rotation=0)
      # ax.set_ylabel('Output Token')
  
      ax2 = ax.twiny()
      ax2.set_xlim([0, ax.get_xlim()[1]])
      if show_inputs:
          # Input token labels at the top
          ax2.set_xticks(ax.get_xticks())
          ax2.set_xticklabels(input_tokens, fontsize=14, rotation=-90)
          ax2.set_xlabel("\nInput Token", fontsize=14)
      else:
          ax2.set_xticks([])
  
      if save_file_path is not None:
          try:
              plt.savefig(save_file_path)
          except:
              e = sys.exc_info()[0]
              print(
                  "<p>Error: (likely ./tmp/ folder does not exist or can't be created). %s</p>"
                  % e
              )
              raise
  
file_path: ecco/src/ecco/lm_plots.py
imports: import seaborn
  import matplotlib.pyplot
  import numpy
  from matplotlib.patches import Rectangle
  from matplotlib.cm import get_cmap
  import copy
  import warnings
  from matplotlib.colors import ListedColormap
  import matplotlib
  from matplotlib.ticker import FuncFormatter
  from typing import Optional, List, Dict
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: plot_inner_token_rankings(input_tokens, output_tokens, rankings, vmin, vmax, show_inputs, save_file_path) without return types