def all_groups_completed(groups):
    """Returns groups if they are all completed, otherwise False."""
    if all(len(g.get('jobs')) == g.get('completed') for g in groups):
        return groups
    else:
        return False