def print_tree(tree, branch='', print_files=True):
    """
    Utility function to pretty-print a collection of files.
    """
    num_files = 0
    tot_file_sz = 0
    unk_files = 0
    for f,v in tree.items():
        if type(v) == dict:
            n, s, u = print_tree(v, '/'.join([branch, f]), print_files)
            num_files += n
            tot_file_sz += s
            unk_files += u
        else:
            num_files += 1
            try:
                tot_file_sz += int(v['fileSize'])
                if print_files:
                    print(f"{int(v['fileSize'])} {'/'.join([branch, f])}")
            except KeyError:
                unk_files += 1
                if print_files:
                    print(f"0 {'/'.join([branch, f])}")

    return num_files, tot_file_sz, unk_files