docstr: Calculate hypervolume of a pareto frontier based on either the posterior
  means of given observation features or observed data.
  
  Args:
      optimization_config: Optimization config to use in place of the one stored
          on the experiment.
      trial_indices: Indices of trials for which to retrieve data. If None will
          retrieve data from all available trials.
      use_model_predictions: Whether to extract the Pareto frontier using
          model predictions or directly observed values. If ``True``,
          the metric means and covariances in this method's output will
          also be based on model predictions and may differ from the
          observed values.
docstr_tok: ["Calculate","hypervolume","of","a","pareto","frontier","based","on","either","the","posterior","means","of","given","observation","features","or","observed","data",".","Args",":","optimization_config",":","Optimization","config","to","use","in","place","of","the","one","stored","on","the","experiment",".","trial_indices",":","Indices","of","trials","for","which","to","retrieve","data",".","If","None","will","retrieve","data","from","all","available","trials",".","use_model_predictions",":","Whether","to","extract","the","Pareto","frontier","using","model","predictions","or","directly","observed","values",".","If","``","True","``",",","the","metric","means","and","covariances","in","this","method","'s","output","will","also","be","based","on","model","predictions","and","may","differ","from","the","observed","values","."]
code: def get_hypervolume(
      self,
      optimization_config: Optional[
          MultiObjectiveOptimizationConfig
      ] = None,
      trial_indices: Optional[Iterable[int]] = None,
      use_model_predictions: bool = True,
  ) -> float:
      """Calculate hypervolume of a pareto frontier based on either the posterior
      means of given observation features or observed data.
  
      Args:
          optimization_config: Optimization config to use in place of the one stored
              on the experiment.
          trial_indices: Indices of trials for which to retrieve data. If None will
              retrieve data from all available trials.
          use_model_predictions: Whether to extract the Pareto frontier using
              model predictions or directly observed values. If ``True``,
              the metric means and covariances in this method's output will
              also be based on model predictions and may differ from the
              observed values.
      """
      pass
  
imports: from abc import ABCMeta, abstractmethod
  from functools import partial
  from logging import Logger
  from typing import Dict, Iterable, List, Optional, Tuple
  import numpy
  import torch
  from ax.core.experiment import Experiment
  from ax.core.map_data import MapData
  from ax.core.objective import ScalarizedObjective
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, OptimizationConfig
  from ax.core.types import TModelPredictArm, TParameterization
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.modelbridge.modelbridge_utils import extract_objective_thresholds, extract_objective_weights, extract_outcome_constraints, observed_hypervolume, predicted_hypervolume, validate_and_apply_final_transform
  from ax.modelbridge.registry import get_model_from_generator_run, ModelRegistryBase
  from ax.modelbridge.torch import TorchModelBridge
  from ax.modelbridge.transforms.derelativize import Derelativize
  from ax.models.torch.botorch_moo_defaults import get_outcome_constraint_transforms, get_weighted_mc_objective_and_objective_thresholds
  from ax.plot.pareto_utils import get_tensor_converter_model
  from ax.service.utils import best_point
  from ax.service.utils.best_point import extract_Y_from_data, fill_missing_thresholds_from_nadir
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
  from botorch.utils.multi_objective.box_decompositions import DominatedPartitioning
label_desc: Use image node_id 4 for calling the BestPointMixin obj's underlying member method code with example usage: obj.get_hypervolume(optimization_config, trial_indices, use_model_predictions) without return types