code: def test_apply_method_on_pipeline_should_call_method_on_each_steps():
      pipeline = Pipeline([MultiplyByN(1), MultiplyByN(1)])
  
      pipeline.apply(
          lambda step: step._set_hyperparams(
              HyperparameterSamples({"multiply_by": 2})
          )
      )
  
      assert pipeline.get_hyperparams()["multiply_by"] == 2
      assert (
          pipeline["MultiplyByN"].get_hyperparams()["multiply_by"] == 2
      )
      assert (
          pipeline["MultiplyByN1"].get_hyperparams()["multiply_by"] == 2
      )
  
imports: import pytest
  from neuraxle.base import BaseStep
  from neuraxle.base import ExecutionContext
  from neuraxle.base import Identity, NonFittableMixin
  from neuraxle.data_container import DataContainer
  from neuraxle.hyperparams.space import HyperparameterSamples
  from neuraxle.pipeline import Pipeline
  from neuraxle.steps.flow import OptionalStep
  from neuraxle.steps.numpy import MultiplyByN
  from neuraxle.steps.output_handlers import OutputTransformerWrapper
label_desc: Use image node_id 2 for calling a global function with example usage: test_apply_method_on_pipeline_should_call_method_on_each_steps() without return types