code: def _split_good_and_bad_trials(
      self, round_report: RoundReport
  ) -> Tuple[List[TrialReport], List[TrialReport]]:
      # Split trials into good and bad using quantile threshold.
      trials_scores: List[
          float
      ] = round_report.list_successful_avg_validation_scores()
  
      trial_sorted_indexes: List[int] = np.argsort(trials_scores)
      if round_report.is_higher_score_better():
          trial_sorted_indexes = list(reversed(trial_sorted_indexes))
  
      # In hyperopt they use this to split, where default_gamma_cap = 25. They clip the max of item they use in the good item.
      # default_gamma_cap is link to the number of recent_trial_at_full_weight also.
      # n_below = min(int(np.ceil(gamma * np.sqrt(len(l_vals)))), gamma_cap)
      n_good = int(
          min(
              self.number_good_trials_max_cap,
              np.ceil(self.quantile_threshold * len(trials_scores)),
          )
      )
  
      good_trials_indexes = trial_sorted_indexes[:n_good]
      bad_trials_indexes = trial_sorted_indexes[n_good:]
  
      good_trials: List[TrialReport] = [
          round_report.successful_trials[i] for i in good_trials_indexes
      ]
      bad_trials: List[TrialReport] = [
          round_report.successful_trials[i] for i in bad_trials_indexes
      ]
  
      return good_trials, bad_trials
  
imports: from collections import Counter
  from operator import itemgetter
  from typing import Any, List, Tuple, Union
  import numpy
  from neuraxle.hyperparams.distributions import Choice, DiscreteHyperparameterDistribution, DistributionMixture, HPSampledValue, HyperparameterDistribution, LogSpaceDistributionMixin, PriorityChoice, Quantized
  from neuraxle.hyperparams.space import HyperparameterSamples, HyperparameterSpace
  from neuraxle.metaopt.data.reporting import RoundReport, TrialReport
  from neuraxle.metaopt.optimizer import BaseHyperparameterOptimizer, GridExplorationSampler
label_desc: Use image node_id 3 for calling the _DividedMixturesFactory obj's underlying member method code with example usage: obj._split_good_and_bad_trials(round_report) and returns: good_trials,  bad_trials