docs: def invertible_flatten2(unflat_list):
      """
      An alternative to invertible_flatten1 which uses cumsum
  
      Flattens ``list`` but remember how to reconstruct the unflat ``list``
      Returns flat ``list`` and the unflat ``list`` with indexes into the flat
      ``list``
  
      Args:
          unflat_list (list):
  
      Returns:
          tuple: flat_list, cumlen_list
  
      SeeAlso:
          invertible_flatten1
          unflatten1
          unflatten2
  
      Example:
          >>> # ENABLE_DOCTEST
          >>> from utool.util_list import *  # NOQA
          >>> import utool
          >>> utool.util_list
          >>> unflat_list = [[5], [2, 3, 12, 3, 3], [9], [13, 3], [5]]
          >>> flat_list, cumlen_list = invertible_flatten2(unflat_list)
          >>> unflat_list2 = unflatten2(flat_list, cumlen_list)
          >>> assert unflat_list2 == unflat_list
          >>> result = ((flat_list, cumlen_list))
          >>> print(result)
          ([5, 2, 3, 12, 3, 3, 9, 13, 3, 5], [1, 6, 7, 9, 10])
  
      TODO: This flatten is faster fix it to be used everywhere
  
      Timeit:
          unflat_list = [[random.random() for _ in range(int(random.random() * 1000))] for __ in range(200)]
          unflat_arrs = list(map(np.array, unflat_list))
  
          %timeit invertible_flatten2(unflat_list)
          %timeit invertible_flatten2_numpy(unflat_list)
          %timeit invertible_flatten2_numpy(unflat_arrs)
  
      Timeits:
          import utool
          unflat_list = aids_list1
          flat_aids1, reverse_list = utool.invertible_flatten1(unflat_list)
          flat_aids2, cumlen_list = utool.invertible_flatten2(unflat_list)
          unflat_list1 = utool.unflatten1(flat_aids1, reverse_list)
          unflat_list2 = utool.unflatten2(flat_aids2, cumlen_list)
          assert list(map(list, unflat_list1)) == unflat_list2
          print(utool.get_object_size_str(unflat_list,  'unflat_list  '))
          print(utool.get_object_size_str(flat_aids1,   'flat_aids1   '))
          print(utool.get_object_size_str(flat_aids2,   'flat_aids2   '))
          print(utool.get_object_size_str(reverse_list, 'reverse_list '))
          print(utool.get_object_size_str(cumlen_list,  'cumlen_list  '))
          print(utool.get_object_size_str(unflat_list1, 'unflat_list1 '))
          print(utool.get_object_size_str(unflat_list2, 'unflat_list2 '))
          print('Timings 1:)
          %timeit utool.invertible_flatten1(unflat_list)
          %timeit utool.unflatten1(flat_aids1, reverse_list)
          print('Timings 2:)
          %timeit utool.invertible_flatten2(unflat_list)
          %timeit utool.unflatten2(flat_aids2, cumlen_list)
      """
      sublen_list = list(map(len, unflat_list))
      if not util_type.HAVE_NUMPY:
          cumlen_list = np.cumsum(sublen_list)
          # Build an unflat list of flat indexes
      else:
          cumlen_list = list(accumulate(sublen_list))
      flat_list = flatten(unflat_list)
      return flat_list, cumlen_list