<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(self):
 """ Check config data consistency Returns ------- """

        if self.sparselib not in self.sparselib_alt:
            logger.warning("Invalid sparse library <{}>".format(self.sparselib))
            self.sparselib = 'umfpack'

        if self.sparselib == 'klu' and not KLU:
            logger.info("Optional package \"cvxoptklu\" available for speed up")
            self.sparselib = 'umfpack'

        return True