def _generate_implicit_chunks(npoints, explicit_chunks):
    """
    Make implicit chunk parameters explicit.

    Parameters
    ----------
    npoints : int
        The number of points.
    explicit_chunks : list
        The explicit chunks.

    Returns
    -------
    chunks : list
        The chunks including both explicit and implicit chunks.

    See Also
    --------
    _expand_buffer : Function using the present function.

    """

    chunks = []
    point_index = 0
    point_chunks = []
    stop_chunk = {'attrs': {'pointIndex': npoints, 'label': '_emptychunk_'}}

    for chunk in explicit_chunks + [stop_chunk]:
        index = chunk['attrs'].get('pointIndex', 0)

        for point_index in range(point_index + 1, index):
            for point_chunk in point_chunks:
                point_chunk = point_chunk.copy()
                point_chunk['attrs'] = point_chunk['attrs'].copy()
                point_chunk['attrs']['pointIndex'] = point_index
                chunks.append(point_chunk)

        if (chunk['attrs'].get('label', '').lower() == '_emptychunk_' and
                index <= npoints):
            break

        if point_index < index < npoints:
            point_index = point_index + 1
            point_chunks = []

        if index != point_index:
            raise IOError("The 'chunk' buffer parameter indices are "
                          "erroneous.")

        chunks.append(chunk)
        point_chunks.append(chunk)

    return chunks