

def show_most_common_types(limit=10, objects=None, shortnames=True):
    'Print the table of types of most common instances.\n\n    The caveats documented in :func:`typestats` apply.\n\n    Example:\n\n        >>> show_most_common_types(limit=5)\n        tuple                      8959\n        function                   2442\n        wrapper_descriptor         1048\n        dict                       953\n        builtin_function_or_method 800\n\n    .. versionadded:: 1.1\n\n    .. versionchanged:: 1.7\n       New parameter: ``objects``.\n\n    .. versionchanged:: 1.8\n       New parameter: ``shortnames``.\n\n    '
    stats = most_common_types(limit, objects, shortnames=shortnames)
    width = max((len(name) for (name, count) in stats))
    for (name, count) in stats:
        print(('%-*s %i' % (width, name, count)))

dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/dep/objgraph.py show_most_common_types/original