code: def test_validate_fe_steps(
      candidate, template, expected, candidate_step_cast
  ):
      """Test that `validate_fe_steps` produces the `expected` output
  
      Parameters
      ----------
      candidate: List
          `candidate` value given to :func:`~hyperparameter_hunter.result_reader.validate_fe_steps`
      template: List
          `template` value given to :func:`~hyperparameter_hunter.result_reader.validate_fe_steps`
      expected: List
          Output expected from invoking `validate_fe_steps` with `candidate` and `template`
      """
      actual = validate_fe_steps(
          candidate_step_cast(candidate), FeatureEngineer(template)
      )
  
      # Because `actual` is going to be a list of `EngineerStep`/`RejectedOptional`, `expected` must
      #   also be passed through a `FeatureEngineer` to convert each function to an `EngineerStep`
      assert actual == FeatureEngineer(expected).steps
  
file_path: hyperparameter_hunter/tests/test_i_o/test_result_reader.py
imports: from hyperparameter_hunter import FeatureEngineer, Categorical
  from hyperparameter_hunter.i_o.exceptions import IncompatibleCandidateError
  from hyperparameter_hunter.i_o.result_reader import validate_fe_steps
  from hyperparameter_hunter.space.dimensions import RejectedOptional
  import pytest
label_desc: Use image node_id 8 for calling a global function with example usage: test_validate_fe_steps(candidate, template, expected, candidate_step_cast) without return types