code: def plot_heatmap(
      data: List,
      fontsize: int,
      x_array_name: str,
      y_array_name: str,
      title: str,
      output_file: str,
      decimal_places: int,
      u_ticks,
      k_ticks,
  ):
      labelsize = fontsize
      # Convert the data to a NumPy array
      data_array = np.array(data)
  
      # Custom annotation function
      def custom_annot(val):
          return (
              "{:.{}f}".format(val, decimal_places) if val > 0 else ""
          )
  
      # Convert the custom annotations to a 2D array
      annot_array = np.vectorize(custom_annot)(data_array)
  
      # Create a masked array to hide the cells with values less than or equal to 0
      masked_data = np.ma.masked_array(data_array, data_array <= 0)
  
      # Set the figure size (width, height) in inches
      fig, ax = plt.subplots(figsize=(8, 4))
  
      # Use the "viridis" colormap
      cmap = "viridis"
  
      # Create a heatmap
      sns.heatmap(
          masked_data,
          annot=annot_array,
          fmt="",
          cmap=cmap,
          mask=masked_data.mask,
          ax=ax,
          annot_kws={"size": fontsize, "ha": "center", "va": "center"},
          xticklabels=u_ticks,
          yticklabels=k_ticks,
      )
  
      # Set axis labels
      ax.set_xlabel(x_array_name, fontsize=fontsize)
      ax.set_ylabel(y_array_name, fontsize=fontsize)
  
      # Set x/y-axis tick size
      ax.tick_params(axis="both", which="major", labelsize=labelsize)
  
      # Set the title
      # ax.set_title(title, fontsize=fontsize)
  
      # Set tight layout
      plt.tight_layout()
  
      # Save the plot to a PDF file
      plt.savefig(output_file)
  
file_path: singa/examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/exps/draw_tab_lib.py
imports: from typing import List
  import numpy
  from matplotlib import pyplot
  from matplotlib.ticker import MaxNLocator
  import warnings
  import matplotlib.cbook
  import seaborn
  import matplotlib.pyplot
label_desc: Use image node_id 4 for calling a global function with example usage: plot_heatmap(data, fontsize, x_array_name, y_array_name, title, output_file, decimal_places, u_ticks, k_ticks) and returns: unknown