code: def testEnsembleSelection(backend):
      """
      Makes sure ensemble selection fit method creates an ensemble correctly
      """
  
      ensemble = EnsembleSelection(
          ensemble_size=10,
          task_type=REGRESSION,
          random_state=0,
          backend=backend,
          metrics=[root_mean_squared_error],
      )
  
      # We create a problem such that we encourage the addition of members to the ensemble
      # Fundamentally, the average of 10 sequential number is 5.5
      # X_data will be ignored and is therefore random
      X_data = np.random.random(size=(100, 2))
      y_true = np.full((100), 5.5)
      predictions = []
      for i in range(1, 20):
          pred = np.full((100), i, dtype=np.float32)
          pred[i * 5 : 5 * (i + 1)] = 5.5 * i
          predictions.append(pred)
  
      ensemble.fit(
          base_models_predictions=predictions,
          X_data=X_data,
          true_targets=y_true,
          model_identifiers=[(i, i, i) for i in range(20)],
          runs=[],
      )
  
      np.testing.assert_array_equal(
          ensemble.weights_,
          np.array(
              [
                  0.1,
                  0.2,
                  0.2,
                  0.1,
                  0.1,
                  0.1,
                  0.1,
                  0.1,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
                  0.0,
              ]
          ),
      )
  
      assert ensemble.identifiers_ == [(i, i, i) for i in range(20)]
  
      np.testing.assert_array_almost_equal(
          np.array(ensemble.trajectory_),
          np.array(
              [
                  3.462296925452813,
                  2.679202306657711,
                  2.2748626436960375,
                  2.065717187806695,
                  1.7874562615598728,
                  1.6983448128441783,
                  1.559451106330085,
                  1.5316326052614575,
                  1.3801950121782542,
                  1.3554980575295374,
              ]
          ),
      )
  
imports: import numpy
  from autosklearn.constants import BINARY_CLASSIFICATION, REGRESSION
  from autosklearn.ensembles.ensemble_selection import EnsembleSelection
  from autosklearn.metrics import accuracy, root_mean_squared_error
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: testEnsembleSelection(backend) without return types