code: def _calc_dataframe_quantiles(
      *, quantiles: List[float], samples: List[pd.DataFrame]
  ) -> List[pd.DataFrame]:
      for s in samples:
          assert isinstance(s, pd.DataFrame)
          assert all(s.columns == samples[0].columns)
          assert all(
              s.index == samples[0].index
          ), "Sanity check shape of bootstrap sample"
  
      try:
          result_np = np.quantile(samples, q=quantiles, axis=0)
      except ValueError as ve:
          raise ValueError(BOOTSTRAP_QUANTILE_ERROR) from ve
  
      result = []
      assert result_np.shape[0] == len(quantiles)
      for i in range(result_np.shape[0]):
          nxt = pd.DataFrame(
              columns=samples[0].columns,
              index=samples[0].index,
              data=result_np[i, :, :],
          )
          result.append(nxt)
  
      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 4 for calling a global function with example usage: _calc_dataframe_quantiles() and returns: result