code: def plot2DGrid(
      scores,
      paramsToPlot,
      keysToPlot,
      scoreLabel,
      greater_is_better,
      vrange,
      cmap,
  ):
      """
      Plots a heatmap of scores, over the paramsToPlot
      :param scores: A list of scores, estimated using parallelizeScore
      :param paramsToPlot: The parameters to plot, chosen automatically by plotScores
      :param scoreLabel: The specified score label (dependent on scoring metric used)
      :param greater_is_better: Choice between optimizing for greater scores or lesser scores
          Used to make better scores darker on colormap
          Default True means greater and False means lesser
      :param vrange: The visible range of the heatmap (range you wish the heatmap to be specified over)
      :param cmap: The chosen colormap for 2D and 3D plotting. Default is YlOrRd
      """
      scoreGrid = np.reshape(
          scores,
          (
              len(paramsToPlot[keysToPlot[0]]),
              len(paramsToPlot[keysToPlot[1]]),
          ),
      )
      plt.figure(
          figsize=(
              int(round(len(paramsToPlot[keysToPlot[1]]) / 1.33)),
              int(round(len(paramsToPlot[keysToPlot[0]]) / 1.33)),
          )
      )
      if not greater_is_better:
          if cmap.endswith("_r"):
              cmap = cmap[:-2]
          else:
              cmap = cmap + "_r"
      if vrange is not None:
          plt.imshow(
              scoreGrid, cmap=cmap, vmin=vrange[0], vmax=vrange[1]
          )
      else:
          plt.imshow(scoreGrid, cmap=cmap)
      plt.xlabel(keysToPlot[1])
      plt.xticks(
          np.arange(len(paramsToPlot[keysToPlot[1]])),
          paramsToPlot[keysToPlot[1]],
      )
      plt.ylabel(keysToPlot[0])
      plt.yticks(
          np.arange(len(paramsToPlot[keysToPlot[0]])),
          paramsToPlot[keysToPlot[0]],
      )
      if scoreLabel is not None:
          plt.title(scoreLabel)
      else:
          plt.title("Score")
      plt.colorbar()
      plt.box(on=False)
      plt.show()
  
imports: import matplotlib.pyplot
  import matplotlib.colorbar
  import numpy
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: plot2DGrid(scores, paramsToPlot, keysToPlot, scoreLabel, greater_is_better, vrange, cmap) without return types