code: def plot_heatmaps(
      heatmap: pd.Series,
      agg: Union[str, Callable] = "max",
      *,
      ncols: int = 3,
      plot_width: int = 1200,
      filename: str = "",
      open_browser: bool = True,
  ):
      """
      Plots a grid of heatmaps, one for every pair of parameters in `heatmap`.
  
      `heatmap` is a Series as returned by
      `backtesting.backtesting.Backtest.optimize` when its parameter
      `return_heatmap=True`.
  
      When projecting the n-dimensional heatmap onto 2D, the values are
      aggregated by 'max' function by default. This can be tweaked
      with `agg` parameter, which accepts any argument pandas knows
      how to aggregate by.
  
      .. todo::
          Lay heatmaps out lower-triangular instead of in a simple grid.
          Like [`skopt.plots.plot_objective()`][plot_objective] does.
  
      [plot_objective]: \
          https://scikit-optimize.github.io/stable/modules/plots.html#plot-objective
      """
      return _plot_heatmaps(
          heatmap, agg, ncols, filename, plot_width, open_browser
      )
  
imports: from collections import OrderedDict
  from inspect import currentframe
  from itertools import compress
  from numbers import Number
  from typing import Callable, Optional, Sequence, Union
  import numpy
  import pandas
  from ._plotting import plot_heatmaps
  from ._stats import compute_stats
  from ._util import _Array, _as_str
  from .backtesting import Strategy
label_desc: Use image node_id 4 for calling a global function with example usage: plot_heatmaps(heatmap, agg) and returns: _plot_heatmaps