def compact_counts_to_100_shots(counts):
    """Compact counts to 100 shots

    This helps to reduce animation generation time, and file size
    
    Args:
        counts (dict): job result counts, e.g. For 1024 shots: {'000': 510, '111': 514}
        
    Returns:
        dict: the compacted-counts, e.g. {'000': 51, '111': 51}
    """
    big_counts = counts.copy()
    if (sum(counts.values())>100):
        total = sum(big_counts.values())/100
        for x in big_counts:
            big_counts[x] = int(big_counts[x]/total)
        big_counts = {x:y for x,y in big_counts.items() if y!=0}
    if (big_counts=={}): return counts
    return big_counts