code: def test_similar_experiments(env_boston, fe_experiment, fe_optimizer):
      """Test that OptimizationProtocols given `Categorical` choices for `FeatureEngineer` steps
      correctly identify past `similar_experiments` when those Experiments' `FeatureEngineer` steps
      executed one of the `EngineerStep` functions in the OptimizationProtocol's choices
  
      Parameters
      ----------
      env_boston: Environment
          Active `Environment` for `fe_experiment` and `fe_optimizer`
      fe_experiment: CVExperiment
          Indirectly parametrized `CVExperiment` that expects as input either None, or a list of
          `steps` given to its :class:`hyperparameter_hunter.feature_engineering.FeatureEngineer`
      fe_optimizer: BaseOptPro
          Indirectly parametrized :class:`~hyperparameter_hunter.optimization_core.BaseOptPro`
          subclass that expects as input either None, or a list of `steps` (some of which should be
          `Categorical`) given to its :class:`hyperparameter_hunter.FeatureEngineer`. `fe_optimizer`
          is expected to contain the `experiment_id` of `fe_experiment` in its `similar_experiments`
  
      Notes
      -----
      This does not test the `optional` kwarg of :class:`hyperparameter_hunter.space.Categorical`. See
      `test_similar_experiments_optional` for such tests"""
      assert fe_experiment.experiment_id in [
          _[2] for _ in fe_optimizer.similar_experiments
      ]
  
imports: from hyperparameter_hunter import __version__
  from hyperparameter_hunter import Environment, CVExperiment, FeatureEngineer, EngineerStep
  from hyperparameter_hunter import Categorical, Integer, BayesianOptPro, GBRT, RF, ET, DummyOptPro
  from hyperparameter_hunter.utils.learning_utils import get_breast_cancer_data, get_boston_data
  from hyperparameter_hunter.utils.optimization_utils import get_choice_dimensions
  from hyperparameter_hunter.utils.version_utils import HHVersion
  import numpy
  from os import makedirs
  import pandas
  import pytest
  from shutil import rmtree
  import sys
  from sklearn.ensemble import AdaBoostRegressor
  from sklearn.linear_model import Ridge
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import MinMaxScaler, Normalizer, QuantileTransformer, StandardScaler
label_desc: Use image node_id 20 for calling a global function with example usage: test_similar_experiments(env_boston, fe_experiment, fe_optimizer) without return types