<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _stormpath_authenticate(self, username, password):
 """Check if Stormpath authentication works :param username: Can be actual username or email :param password: Account password Returns an account object if successful or None otherwise. """

        APPLICATION = get_application()
        try:
            result = APPLICATION.authenticate_account(username, password)
            return result.account
        except Error as e:
            log.debug(e)
            return None