code: def test_flatten_for_each_should_transform_data_inputs_and_expected_outputs():
      p = FlattenForEach(
          Pipeline(
              [MultiplyByN(2), OutputTransformerWrapper(MultiplyByN(3))]
          )
      )
      # TODO: should use a tape here and ensure that the MultiplyByN received a flat 12 shape only once and not 3*4 things
      data_inputs, expected_outputs = _create_random_of_shape(
          DATA_SHAPE
      )
  
      p, outputs = p.handle_fit_transform(
          DACT(
              data_inputs=data_inputs, expected_outputs=expected_outputs
          ),
          CX(),
      )
  
      assert np.array(outputs.data_inputs).shape == DATA_SHAPE
      assert np.array_equal(outputs.data_inputs, data_inputs * 2)
      assert np.array(outputs.expected_outputs).shape == DATA_SHAPE
      assert np.array_equal(
          outputs.expected_outputs, expected_outputs * 3
      )
  
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 3 for calling a global function with example usage: test_flatten_for_each_should_transform_data_inputs_and_expected_outputs() without return types