<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def debug_toolbar_callback(request):
 """Show the debug toolbar to those with the Django staff permission, excluding the Eighth Period office."""


    if request.is_ajax():
        return False

    if not hasattr(request, 'user'):
        return False
    if not request.user.is_authenticated:
        return False
    if not request.user.is_staff:
        return False
    if request.user.id == 9999:
        return False

    return "debug" in request.GET or settings.DEBUG