<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def one(self):
        ''' Execute the query and return one result.  If more than one result
            is returned, raises a ``BadResultException``
        '''
        count = -1
        for count, result in enumerate(self):
            if count > 0:
                raise BadResultException('Too many results for .one()')
        if count == -1:
            raise BadResultException('Too few results for .one()')
        return result