code: def test_flatten_for_each_should_transform_data_inputs():
      p = FlattenForEach(MultiplyByN(2), then_unflatten=False)
      data_inputs, _ = _create_random_of_shape(DATA_SHAPE)
  
      outputs = p.transform(data_inputs)
  
      assert np.array(outputs).shape == FLAT_DATA_SHAPE
      assert np.array_equal(
          outputs.flatten(), data_inputs.flatten() * 2
      )
  
file_path: Neuraxle/testing_neuraxle/steps/test_flatten_for_each.py
imports: import numpy
  from neuraxle.base import ExecutionContext
  from neuraxle.data_container import DataContainer
  from neuraxle.pipeline import Pipeline
  from neuraxle.steps.loop import FlattenForEach
  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_flatten_for_each_should_transform_data_inputs() without return types