def chunk(lst, n_chunks):
    """
    https://stackoverflow.com/questions/2130016/
    splitting-a-list-into-n-parts-of-approximately-equal-length

    Parameters
    ----------
    lst : list
    n_chunks : int

    Returns
    -------
    list
        chunked list

    """
    k, m = divmod(len(lst), n_chunks)
    return [lst[i * k + min(i, m):(i + 1) * k + min(i + 1, m)]
            for i in range(n_chunks)]