code: def test_parallel_queued_threads_do_parallelize_sleep_correctly():
      sleep_time = 0.001
      data_inputs = range(100)
      expected_outputs = (
          MultiplyByN(2**10).transform(data_inputs).tolist()
      )
      sleepers = [
          Pipeline(
              [
                  ForEach(
                      Sleep(
                          sleep_time=sleep_time / 2,
                          add_random_quantity=sleep_time,
                      )
                  ),
                  MultiplyByN(2),
                  TransformOnlyCounterLoggingStep().set_name(
                      f"SleeperLogger{i}"
                  ),
              ]
          )
          for i in range(10)
      ]
  
      p = SequentialQueuedPipeline(
          sleepers,
          batch_size=5,
          n_workers_per_step=4,
          use_processes=False,
          use_savers=False,
      ).with_context(CX())
  
      a = time.time()
      outputs_streaming = p.transform(data_inputs)
      b = time.time()
      time_queued_pipeline = b - a
  
      p = Pipeline(
          sleepers,
      )
  
      a = time.time()
      outputs_vanilla = p.transform(data_inputs)
      b = time.time()
      time_vanilla_pipeline = b - a
  
      assert np.array_equal(outputs_vanilla, expected_outputs)
      assert len(outputs_streaming) == len(expected_outputs), (
          outputs_streaming,
          expected_outputs,
      )
      assert np.array_equal(outputs_streaming, expected_outputs)
      assert time_queued_pipeline < time_vanilla_pipeline
  
imports: import copy
  import random
  import time
  from typing import List, Type
  import numpy
  import pytest
  from neuraxle.base import BaseStep
  from neuraxle.base import ExecutionContext
  from neuraxle.base import NonFittableMixin
  from neuraxle.data_container import ARG_X_INPUTTED, ARG_Y_PREDICTD, DACT, PredsDACT, StripAbsentValues, TrainDACT
  from neuraxle.distributed.streaming import BaseQueuedPipeline, ParallelQueuedFeatureUnion, ParallelWorkersWrapper, QueuedMinibatchTask, SequentialQueuedPipeline, WorkersJoiner
  from neuraxle.metaopt.context import AutoMLContext
  from neuraxle.pipeline import Pipeline
  from neuraxle.steps.loop import ForEach
  from neuraxle.steps.misc import FitTransformCallbackStep, Sleep, TransformOnlyCounterLoggingStep
  from neuraxle.steps.numpy import MultiplyByN
label_desc: Use image node_id 14 for calling a global function with example usage: test_parallel_queued_threads_do_parallelize_sleep_correctly() without return types