def collect_info(smlt):
    """
    Given a path to a source model logic tree, collect all of the
    path names to the source models it contains and build
    1. a dictionary source model branch ID -> paths
    2. a dictionary source model branch ID -> source IDs in applyToSources

    :param smlt: source model logic tree file
    :returns: an Info namedtupled containing the two dictionaries
    """
    n = nrml.read(smlt)
    try:
        blevels = n.logicTree
    except Exception:
        raise InvalidFile('%s is not a valid source_model_logic_tree_file'
                          % smlt)
    paths = collections.defaultdict(set)  # branchID -> paths
    applytosources = collections.defaultdict(list)  # branchID -> source IDs
    for blevel in blevels:
        for bset in blevel:
            if 'applyToSources' in bset.attrib:
                applytosources[bset['branchSetID']].extend(
                        bset['applyToSources'].split())
            for br in bset:
                with node.context(smlt, br):
                    fnames = unique(br.uncertaintyModel.text.split())
                    paths[br['branchID']].update(get_paths(smlt, fnames))
    return Info({k: sorted(v) for k, v in paths.items()}, applytosources)
Given a path to a source model logic tree, collect all of the
    path names to the source models it contains and build
    1. a dictionary source model branch ID -> paths
    2. a dictionary source model branch ID -> source IDs in applyToSources

    :param smlt: source model logic tree file
    :returns: an Info namedtupled containing the two dictionaries