def lists2dict(list_of_pipeline_description, url, d):
    """ Convert a list of splited module names to a hierachic dictionary with
    list leafs that contain the url to the module docuementation.

    Parameters
    ----------
    list_of_pipeline_description: list of list of str (mandatory)
        the splited module names to organize bu modules
    url: str (mandatory)
        the url to the module documentation

    Returns
    -------
    d: hierachic dict
        each key is a sub module of the module. Leafs contain a list with
        the url to the documentation.
    """
    # Go through all pipeline descriptions
    for l in list_of_pipeline_description:

        # Reach a leaf (a pipeline)
        if len(l) == 1:
            d.setdefault(l[0], []).append(url or "")

        # Continue the recursion
        else:
            if not l[0] in d:
                d[l[0]] = lists2dict([l[1:]], url, {})
            else:
                d[l[0]].update(lists2dict([l[1:]], url, d[l[0]]))

    return d