<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_user_by_password(self, username, password):
 """ Given a username and a raw, unhashed password, get the corresponding user, retuns None if no match is found. """

        try:
            user = self.get(username=username)
        except User.DoesNotExist:
            return None
        
        if bcrypt.hashpw(password, user.pass_hash) == user.pass_hash:
            return user
        else:
            return None