def is_middleware_class(middleware_class, middleware_path):
    try:
        middleware_cls = import_string(middleware_path)
    except __HOLE__:
        return
    return issubclass(middleware_cls, middleware_class)
dataset/ETHPy150Open django-debug-toolbar/django-debug-toolbar/debug_toolbar/settings.py/is_middleware_class