def most_common_types(limit=10, objects=None, shortnames=True):
    stats = sorted(typestats(objects, shortnames=shortnames).items(),
                   key=operator.itemgetter(1), reverse=True)
    if limit:
        stats = stats[:limit]
    return stats
Count the names of types with the most instances.
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/objgraph.py/most_common_types