class_docstr: Abstract class for preparing data in order to train a surrogate model.
  
  Parameters
  ----------
  scenario : Scenario object.
  considered_states : list[StatusType], defaults to [StatusType.SUCCESS, StatusType.CRASHED, StatusType.MEMORYOUT]  # noqa: E501
      Trials with the passed states are considered.
  lower_budget_states : list[StatusType], defaults to []
      Additionally consider all trials with these states for budget < current budget.
  scale_percentage : int, defaults to 5
      Scaled y-transformation use a percentile to estimate distance to optimum. Only used in some sub-classes.
  seed : int | None, defaults to none
  
  Raises
  ------
  TypeError
      If no success states are given.
docstr: Returns all trials that are considered for the model.
  Depends on the user's considered states and lower budget states.
  
  Parameters
  ----------
  budget_subset : list[int|float] | None, defaults to None.
docstr_tok: ["Returns","all","trials","that","are","considered","for","the","model",".","Depends","on","the","user","'s","considered","states","and","lower","budget","states",".","Parameters","--","--","--","--","--","budget_subset",":","list","[","int|float","]","|","None",",","defaults","to","None","."]
code: def _get_considered_trials(
      self,
      budget_subset: list | None = None,
  ) -> dict[TrialKey, TrialValue]:
      """
      Returns all trials that are considered for the model.
      Depends on the user's considered states and lower budget states.
  
      Parameters
      ----------
      budget_subset : list[int|float] | None, defaults to None.
      """
      trials: dict[TrialKey, TrialValue] = {}
  
      if budget_subset is not None:
          if len(budget_subset) != 1:
              raise ValueError(
                  "Can not yet handle getting runs from multiple budgets."
              )
  
      for trial_key, trial_value in self.runhistory.items():
          add = False
          if budget_subset is not None:
              if (
                  trial_key.budget in budget_subset
                  and trial_value.status in self._considered_states
              ):
                  add = True
  
              if (
                  trial_key.budget is not None
                  and budget_subset[0] is not None
                  and trial_key.budget < budget_subset[0]
                  and trial_value.status in self._lower_budget_states
              ):
                  add = True
          else:
              # Get only successfully finished runs
              if trial_value.status in self._considered_states:
                  add = True
  
          if add:
              trials[trial_key] = trial_value
  
      return trials
  
imports: from __future__ import annotations
  from abc import abstractmethod
  from typing import Any, Mapping
  import numpy
  from smac.multi_objective import AbstractMultiObjectiveAlgorithm
  from smac.runhistory.runhistory import RunHistory, TrialKey, TrialValue
  from smac.runner.abstract_runner import StatusType
  from smac.scenario import Scenario
  from smac.utils.configspace import convert_configurations_to_array
  from smac.utils.logging import get_logger
label_desc: Use image node_id 8 for calling the AbstractRunHistoryEncoder obj's underlying member method code with example usage: obj._get_considered_trials(budget_subset) and returns: trials