def stat_compute(vuln_to_hosts, host_to_vulns): 
    stat_vuln_count = len(vuln_to_hosts)
    stat_host_count = len(host_to_vulns)
    host_counts = {}
    most_pop_vuln = (None, 0)
    for vuln,hosts in vuln_to_hosts.iteritems():
        if len(hosts) > most_pop_vuln[1]:
            most_pop_vuln = (vuln, len(hosts))
        for host in hosts:
            if host not in host_counts:
                host_counts[host] = 1
            else:
                host_counts[host] += 1
    most_vuln_host = (None, 0)
    for host,count in host_counts.iteritems():
        if count > most_vuln_host[1]:
            most_vuln_host = (host, count)
    return (stat_vuln_count, stat_host_count, most_pop_vuln[0], most_vuln_host[0])
dataset/ETHPy150Open maxburkhardt/nessus-parser/util/statistics.py/stat_compute/original