def extract_from_files(
        files: List[Path],
        languages: Dict[str, List[str]]) -> DataSet:
    """Extract arrays of features from the given files.

    :param files: list of paths
    :param languages: language name =>
        associated file extension list
    :return: features
    """
    enumerator = enumerate(sorted(languages.items()))
    rank_map = {ext: rank for rank, (_, exts) in enumerator for ext in exts}

    with multiprocessing.Pool(initializer=_process_init) as pool:
        file_iterator = ((path, rank_map) for path in files)
        arrays = _to_arrays(pool.starmap(_extract_features, file_iterator))

    LOGGER.debug("Extracted arrays count: %d", len(arrays[0]))
    return arrays
Extract arrays of features from the given files.

    :param files: list of paths
    :param languages: language name =>
        associated file extension list
    :return: features