code: def draw_box_plot(
      x_to_ys: Mapping[str, Union[List[float], np.ndarray]],
      ax: matplotlib.axis.Axis,
      rotate_xticklabels: bool = True,
  ):
      """Given a mapping from string to floats, draw a box plot on the given axis ax. For instance, this might be a
      mapping from scenario_name to a list of model accuracies in which case the box plot captures aggregate model
      performance and highlights outliers."""
      xs: List[str] = []
      all_ys: List[List[float]] = []
      for x, ys in x_to_ys.items():
          ys = [y for y in ys if not np.isnan(y)]
          if ys:
              xs.append(x)
              all_ys.append(ys)
              ax.scatter([len(xs)] * len(ys), ys, c="#bbb")
      ax.boxplot(
          all_ys,
          boxprops={"linewidth": 2},
          medianprops={"linewidth": 2},
      )
      if rotate_xticklabels:
          ax.set_xticklabels(xs, rotation=-30, ha="left")
      else:
          ax.set_xticklabels(xs)
  
imports: import argparse
  from collections import defaultdict
  from dataclasses import dataclass
  from datetime import date
  import json
  import os
  from typing import List, Dict, Optional, Any, Callable, Union, Mapping, Tuple, Set
  import colorcet
  import matplotlib
  import matplotlib.pyplot
  import numpy
  from scipy.stats import pearsonr
  import seaborn
  from helm.common.hierarchical_logger import hlog
  from helm.benchmark.presentation.schema import read_schema
  from helm.benchmark.presentation.summarize import AGGREGATE_WIN_RATE_COLUMN
label_desc: Use image node_id 3 for calling a global function with example usage: draw_box_plot(x_to_ys, ax, rotate_xticklabels) without return types