code: def plot3DGrid(
      scores,
      paramsToPlot,
      keysToPlot,
      scoreLabel,
      greater_is_better,
      vrange,
      cmap,
  ):
      """
      Plots a grid of heatmaps 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
      """
      vmin = np.min(scores)
      vmax = np.max(scores)
      scoreGrid = np.reshape(
          scores,
          (
              len(paramsToPlot[keysToPlot[0]]),
              len(paramsToPlot[keysToPlot[1]]),
              len(paramsToPlot[keysToPlot[2]]),
          ),
      )
  
      smallest_dim = np.argmin(scoreGrid.shape)
      if smallest_dim != 2:
          scoreGrid = np.swapaxes(scoreGrid, smallest_dim, 2)
          keysToPlot[smallest_dim], keysToPlot[2] = (
              keysToPlot[2],
              keysToPlot[smallest_dim],
          )
  
      nelements = scoreGrid.shape[2]
      nrows = np.floor(nelements**0.5).astype(int)
      ncols = np.ceil(1.0 * nelements / nrows).astype(int)
      fig, axes = plt.subplots(
          nrows=nrows,
          ncols=ncols,
          sharex="all",
          sharey="all",
          figsize=(
              int(
                  round(len(paramsToPlot[keysToPlot[1]]) * ncols * 1.33)
              ),
              int(
                  round(len(paramsToPlot[keysToPlot[0]]) * nrows * 1.33)
              ),
          ),
      )
  
      if not greater_is_better:
          if cmap.endswith("_r"):
              cmap = cmap[:-2]
          else:
              cmap = cmap + "_r"
      i = 0
      for ax in axes.flat:
          if vrange is not None:
              im = ax.imshow(
                  scoreGrid[:, :, i],
                  cmap=cmap,
                  vmin=vrange[0],
                  vmax=vrange[1],
              )
          else:
              im = ax.imshow(
                  scoreGrid[:, :, i], cmap=cmap, vmin=vmin, vmax=vmax
              )
          ax.set_xlabel(keysToPlot[1])
          ax.set_xticks(np.arange(len(paramsToPlot[keysToPlot[1]])))
          ax.set_xticklabels(paramsToPlot[keysToPlot[1]])
          ax.set_ylabel(keysToPlot[0])
          ax.set_yticks(np.arange(len(paramsToPlot[keysToPlot[0]])))
          ax.set_yticklabels(paramsToPlot[keysToPlot[0]])
          ax.set_title(
              keysToPlot[2]
              + " = "
              + str(paramsToPlot[keysToPlot[2]][i])
          )
          ax.spines["top"].set_visible(False)
          ax.spines["right"].set_visible(False)
          ax.spines["bottom"].set_visible(False)
          ax.spines["left"].set_visible(False)
          i += 1
          if i == nelements:
              break
      if scoreLabel is not None:
          fig.suptitle(scoreLabel, fontsize=18)
      else:
          fig.suptitle("Score", fontsize=18)
      fig.subplots_adjust(right=0.8)
      cbar = cb.make_axes(ax, location="right", fraction=0.03)
      fig.colorbar(im, cax=cbar[0])
      plt.show()
  
imports: import matplotlib.pyplot
  import matplotlib.colorbar
  import numpy
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: plot3DGrid(scores, paramsToPlot, keysToPlot, scoreLabel, greater_is_better, vrange, cmap) without return types