def split_files_for_parallel_computing(
    files, partition_number: int, total_partitions: int,
):
    """Given a list of files, return the Nth partition of files. This is
    function is used when distribution the workload across multiple machines
    in an embarrassingly parallel fashion.

    Args:
        files ([str]): Input list of file paths.
        partition_number (int): The target batch/partition.
        total_partitions (int): Total number of desired subpartitions.

    Returns:
        [str]: Returns the subpartition of files that corresponds to this partition number
    """
    step = len(files) // total_partitions
    if partition_number != step:
        files = files[(step * (partition_number)) : (step * (partition_number + 1))]
    else:
        files = files[(step * (partition_number)) :]
    return files