code: def generate_single_bootstrap_sample(
      *,
      random_state: Union[int, np.random.RandomState],
      data: pd.DataFrame,
      annotated_functions: Dict[str, AnnotatedMetricFunction],
      sensitive_feature_names: List[str],
      control_feature_names: Optional[List[str]],
  ) -> DisaggregatedResult:
      """Create a single bootstrapped DisaggregatedResult."""
      assert random_state is not None, "Must specify random_state"
  
      sampled_data = data.sample(
          frac=1,
          replace=True,
          random_state=random_state,
          axis=0,
          ignore_index=True,
      )
  
      result = DisaggregatedResult.create(
          data=sampled_data,
          annotated_functions=annotated_functions,
          sensitive_feature_names=sensitive_feature_names,
          control_feature_names=control_feature_names,
      )
      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 1 for calling a global function with example usage: generate_single_bootstrap_sample() and returns: result