code: def adjust_privileges(state, privileges):
          
          with win32.OpenProcessToken(win32.GetCurrentProcess(),
                                  win32.TOKEN_ADJUST_PRIVILEGES) as hToken:
              NewState = ( (priv, state) for priv in privileges )
              win32.AdjustTokenPrivileges(hToken, NewState)
docs: Requests or drops privileges.
  
          @type  state: bool
          @param state: C{True} to request, C{False} to drop.
  
          @type  privileges: list(int)
          @param privileges: Privileges to request or drop.
  
          @raise WindowsError: Raises an exception on error.