code: def __init__(
      self,
      ensemble_size: int,
      problem_type: str,
      metric,
      sorted_initialization: bool = False,
      bagging: bool = False,
      tie_breaker: str = "random",
      random_state: np.random.RandomState = None,
      **kwargs,
  ):
      self.ensemble_size = ensemble_size
      self.problem_type = problem_type
      self.metric = metric
      self.sorted_initialization = sorted_initialization
      self.bagging = bagging
      self.use_best = True
      if tie_breaker not in ["random", "second_metric"]:
          raise ValueError(
              f"Unknown tie_breaker value: {tie_breaker}. Must be one of: ['random', 'second_metric']"
          )
      self.tie_breaker = tie_breaker
      if random_state is not None:
          self.random_state = random_state
      else:
          self.random_state = np.random.RandomState(seed=0)
      self.quantile_levels = kwargs.get("quantile_levels", None)
  
imports: import logging
  import time
  from collections import Counter
  import numpy
  from ...constants import PROBLEM_TYPES
  from ...metrics import log_loss
  from ...utils import compute_weighted_metric, get_pred_from_proba
label_desc: Use image node_id 1 to create a new EnsembleSelection object from inherited base classes: AbstractWeightedEnsemble with example: obj = EnsembleSelection(ensemble_size, problem_type, metric, sorted_initialization, bagging, tie_breaker, random_state)