code: def calculate_pandas_quantiles(
      quantiles: List[float],
      bootstrap_samples: List[Union[pd.Series, pd.DataFrame]],
  ) -> Union[List[pd.Series], List[pd.DataFrame]]:
      """Calculate quantiles for a list of pandas objects."""
      if isinstance(bootstrap_samples[0], pd.Series):
          result = _calc_series_quantiles(
              quantiles=quantiles, samples=bootstrap_samples
          )
      elif isinstance(bootstrap_samples[0], pd.DataFrame):
          result = _calc_dataframe_quantiles(
              quantiles=quantiles, samples=bootstrap_samples
          )
      else:
          assert False, "Should not be possible to get here"
      return result
  
file_path: fairlearn/fairlearn/metrics/_bootstrap.py
imports: import logging
  from typing import Dict, List, Optional, Union
  import numpy
  import pandas
  from ._annotated_metric_function import AnnotatedMetricFunction
  from ._disaggregated_result import DisaggregatedResult
label_desc: Use image node_id 5 for calling a global function with example usage: calculate_pandas_quantiles(quantiles, bootstrap_samples) and returns: result