<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def on_capability_sasl_available(self, value):
 """ Check whether or not SASL is available. """

        if value:
            self._sasl_mechanisms = value.upper().split(',')
        else:
            self._sasl_mechanisms = None

        if self.sasl_mechanism == 'EXTERNAL' or (self.sasl_username and self.sasl_password):
            if self.sasl_mechanism == 'EXTERNAL' or puresasl:
                return True
            self.logger.warning('SASL credentials set but puresasl module not found: not initiating SASL authentication.')
        return False