code: def test_no_pca(configspace_small, make_scenario):
      n_instances = 100
      n_instance_features = 10
      n_samples = 5
  
      scenario = make_scenario(
          configspace_small,
          use_instances=True,
          n_instances=n_instances,
          n_instance_features=n_instance_features,
      )
      model = AbstractModel(
          configspace_small,
          scenario.instance_features,
          pca_components=7,
      )
      # We just overwrite the function as mock here
      model._train = _train
  
      # No PCA
      X, y = get_X_y(configspace_small, n_samples, n_instance_features)
      model.train(X, y)
      assert not model._apply_pca
  
      X, y = get_X_y(
          configspace_small, n_samples, n_instance_features + 1
      )
      with pytest.raises(ValueError, match="Feature mismatch.*"):
          model.train(X, y)
  
      X_test, _ = get_X_y(configspace_small, n_samples, None)
      with pytest.raises(NotImplementedError):
          model.predict_marginalized(X_test)
  
      X_test, _ = get_X_y(configspace_small, n_samples, 10)
      with pytest.raises(ValueError, match="Feature mismatch.*"):
          model.predict_marginalized(X_test)
  
imports: import numpy
  import pytest
  from smac.model.abstract_model import AbstractModel
  from smac.utils.configspace import convert_configurations_to_array
label_desc: Use image node_id 3 for calling a global function with example usage: test_no_pca(configspace_small, make_scenario) without return types