def iter_all(class_name):
    """Iterate over all objects of the same class by its class name"""
    for cls, wdict in six.iteritems(live_refs):
        if cls.__name__ == class_name:
            return six.iterkeys(wdict)
Iterate over all objects of the same class by its class name
stackoverflow/venv/lib/python3.6/site-packages/scrapy/utils/trackref.py