code: def plot_kpis(
      plot_specs: Dict[str, List[Any]],
      event_log_dirs: Dict[str, Path],
      subplot_shape: Tuple[int, int],
  ):
      """Render KPI plots.
  
      :param plot_specs: Specification of what to plot
      :param event_log_dirs: Where the experiment data are located
      :param subplot_shape: How to layout the subplots
      """
      kpis_df = load_data_for_event(event_log_dirs, "BaseEnvEvents.kpi")
  
      plt.clf()
      for i, (kpi_name, spec) in enumerate(plot_specs.items()):
          plt.subplot(subplot_shape[0], subplot_shape[1], i + 1)
          sns.barplot(
              x="experiment",
              y="value",
              data=kpis_df[kpis_df.name == spec[0]],
              palette="muted",
          )
          plt.ylabel(kpi_name)
          plt.ylim(spec[1])
  
      plt.tight_layout()
      plt.show()
  
file_path: maze/evaluation/rollout_evaluation_plots.py
imports: import argparse
  from pathlib import Path
  from typing import Dict, Tuple, List, Any
  import matplotlib.pyplot
  import pandas
  import seaborn
  import yaml
  from maze.core.rendering.events_stats_renderer import EventStatsRenderer
label_desc: Use image node_id 4 for calling a global function with example usage: plot_kpis(plot_specs, event_log_dirs, subplot_shape) without return types