def tidy_stacktrace(strace):
    trace = []
    for s in strace[:-1]:
        s_path = os.path.realpath(s[0])
        if getattr(settings, 'DEVSERVER_CONFIG', {}).get('HIDE_DJANGO_SQL', True) \
            and django_path in s_path and not 'django/contrib' in s_path:
            continue
        if socketserver_path in s_path:
            continue
        trace.append((s[0], s[1], s[2], s[3]))
    return trace
Clean up stacktrace and remove all entries that:
dataset/ETHPy150Open dcramer/django-devserver/devserver/utils/stack.py/tidy_stacktrace