code: def get_all_positions(dataset, num_workers=1):
      
      positions = []
      identifiers = tqdm(
          list(get_all_identifiers(dataset)), desc="get_all_positions(%s)" % dataset.name)
      with Pool(num_workers) as pool:
          for directory, identifier, position in pool.map(_get_position_worker, identifiers):
              positions.append((directory, identifier, position))
      for directory, identifier, position in positions:
          yield (directory, identifier, position)
docs: Extracts paragraph identifiers, and positions from a dataset in the NTCIR-11 Math-2, and
      NTCIR-12 MathIR XHTML5 format.
  
      Parameters
      ----------
      dataset : Path
          A path to a dataset.
      num_workers : int, optional
          The number of processes that will extract paragraph positions from the dataset.
  
      Yields
      -------
      (Path, str, float)
          A parent directory of a paragraph, the identifier of the paragraph, and an estimate of the
          position of the paragraph in its parent document. The position is in the range [0; 1).