<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_lt(self):
 """ Check is the POSTed LoginTicket is valid, if yes invalide it :return: ``True`` if the LoginTicket is valid, ``False`` otherwise :rtype: bool """

        # save LT for later check
        lt_valid = self.request.session.get('lt', [])
        lt_send = self.request.POST.get('lt')
        # generate a new LT (by posting the LT has been consumed)
        self.gen_lt()
        # check if send LT is valid
        if lt_send not in lt_valid:
            return False
        else:
            self.request.session['lt'].remove(lt_send)
            # we need to redo the affectation for django to detect that the list has changed
            # and for its new value to be store in the session
            self.request.session['lt'] = self.request.session['lt']
            return True