code: def _delAccountRights(sidObject, user_right):
      '''
      helper function to remove an account right from a user
      '''
      try:
          _polHandle = win32security.LsaOpenPolicy(None, win32security.POLICY_ALL_ACCESS)
          user_rights_list = [user_right]
          _ret = win32security.LsaRemoveAccountRights(_polHandle, sidObject, False, user_rights_list)
          return True
      except Exception as e:
          log.exception('Error attempting to delete account right')
          return Falsf _delAccountRights(sidObject, user_right):
      '''
      helper function to remove an account right from a user
      '''
      try:
          _polHandle = win32security.LsaOpenPolicy(None, win32security.POLICY_ALL_ACCESS)
          user_rights_list = [user_right]
          _ret = win32security.LsaRemoveAccountRights(_polHandle, sidObject, False, user_rights_list)
          return True
      except Exception as e:
          log.exception('Error attempting to delete account right')
          return False
docs: helper function to remove an account right from a user