class_docstr: The multi-output Conditional Value-at-Risk risk measure that operates on
  each output dimension independently. Since this does not consider the joint
  distribution of the outputs (i.e., that the outputs were evaluated on same
  perturbed input and are not independent), the risk estimates provided by
  `IndependentCVaR` in general are more optimistic than the definition of CVaR
  would suggest.
  
  The Conditional Value-at-Risk measures the expectation of the worst outcomes
  (small rewards or large losses) with a total probability of `1 - alpha`. It
  is commonly defined as the conditional expectation of the reward function,
  with the condition that the reward is smaller than the corresponding
  Value-at-Risk (also defined below).
  
  NOTE: Due to the use of a discrete `w_set` of samples, the VaR and CVaR
  calculated here are (possibly biased) Monte-Carlo approximations of the
  true risk measures.
docstr: Get the prepared samples that are sorted over the `n_w` dimension.
  
  Args:
      samples: A `sample_shape x batch_shape x (q * n_w) x m`-dim tensor of
          posterior samples. The q-batches should be ordered so that each
          `n_w` block of samples correspond to the same input.
  
  Returns:
      A `sample_shape x batch_shape x q x n_w x m'`-dim tensor of sorted samples.
docstr_tok: ["Get","the","prepared","samples","that","are","sorted","over","the","`","n_w","`","dimension",".","Args",":","samples",":","A","`","sample_shape","x","batch_shape","x","(","q","*","n_w",")","x","m","`","-dim","tensor","of","posterior","samples",".","The","q-batches","should","be","ordered","so","that","each","`","n_w","`","block","of","samples","correspond","to","the","same","input",".","Returns",":","A","`","sample_shape","x","batch_shape","x","q","x","n_w","x","m","'","`","-dim","tensor","of","sorted","samples","."]
code: def _get_sorted_prepared_samples(self, samples: Tensor) -> Tensor:
      r"""Get the prepared samples that are sorted over the `n_w` dimension.
  
      Args:
          samples: A `sample_shape x batch_shape x (q * n_w) x m`-dim tensor of
              posterior samples. The q-batches should be ordered so that each
              `n_w` block of samples correspond to the same input.
  
      Returns:
          A `sample_shape x batch_shape x q x n_w x m'`-dim tensor of sorted samples.
      """
      prepared_samples = self._prepare_samples(samples)
      return prepared_samples.sort(dim=-2, descending=True).values
  
imports: import warnings
  from abc import ABC, abstractmethod
  from math import ceil
  from typing import Callable, List, Optional, Union
  import torch
  from botorch.acquisition.multi_objective.objective import IdentityMCMultiOutputObjective, MCMultiOutputObjective
  from botorch.acquisition.risk_measures import CVaR, RiskMeasureMCObjective, VaR
  from botorch.exceptions.errors import UnsupportedError
  from botorch.exceptions.warnings import BotorchWarning
  from botorch.models.model import Model
  from botorch.utils.multi_objective.pareto import is_non_dominated
  from botorch.utils.transforms import normalize
  from torch import Tensor
label_desc: Use image node_id 1 for calling the IndependentCVaR obj's underlying member method code with example usage: obj._get_sorted_prepared_samples(samples) and returns: prepared_samples