import collections


def fill_dashboards(tabs):
    """Returns {dash: [(tab, path)]}, set([path]) tuple from found tabs."""
    dashboards = collections.defaultdict(list)
    test_groups = set()
    for (dash, tab, path) in tabs:
        dashboards[dash].append((tab, path))
        test_groups.add(path)
    return dashboards, test_groups