class_docstr: Step that reduces a dimension instead of manually looping on it.
  
  Using this step is equivalent to doing `sum(dact_data, [])` for each dact_data
  that might be a IDT, DIT, or EOT of a DACT (DAtaConTainer) to flatten the data,
  then the data is by default unflattened at the end of the loop in _did_process.
class_docstr_tok: ["Step","that","reduces","a","dimension","instead","of","manually","looping","on","it",".","Using","this","step","is","equivalent","to","doing","`","sum","(","dact_data",",","[","]",")","`","for","each","dact_data","that","might","be","a","IDT",",","DIT",",","or","EOT","of","a","DACT","(","DAtaConTainer",")","to","flatten","the","data",",","then","the","data","is","by","default","unflattened","at","the","end","of","the","loop","in","_did_process","."]
docstr: Reaugment list with the flattened dimension lengths.
code: def _reaugment_list(
      self, _data: DACTData, flattened_dims_lengths: List[lens]
  ) -> List[DACTData]:
      """
      Reaugment list with the flattened dimension lengths.
      """
      if not self.then_unflatten or _data is None:
          return _data
  
      reaugmented_list: List[DACTData] = []
      i = 0
      for list_length in flattened_dims_lengths:
          sub_list: DACTData = _data[i : i + list_length]
          reaugmented_list.append(sub_list)
          i += list_length
  
      return reaugmented_list
  
imports: import copy
  from operator import itemgetter
  from typing import Callable, List, Optional, Tuple, Union
  from neuraxle.base import CX, DACT, BaseStep, BaseTransformer, ForceHandleMixin, ForceHandleOnlyMixin, Identity, MetaStep, NamedStepsList, TruncableJoblibStepSaver
  from neuraxle.data_container import DIT, EOT, IDT, DACTData, ListDataContainer
  from neuraxle.steps.flow import ExecuteIf
  import numpy
label_desc: Use image node_id 5 for calling the FlattenForEach obj's underlying member method code with example usage: obj._reaugment_list(_data, flattened_dims_lengths) and returns: reaugmented_list, _data