<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def collect_one(self, *args, **kwargs):
 """Same as `collect` but expects to have only one result. :return: the only result directly, not the generator like `collect`. """

        generator = self.collect(*args, **kwargs)
        try:
            value = next(generator)
        except StopIteration:
            raise Exception("Expected exactly one value don't have any")
        try:
            next(generator)
        except StopIteration:
            return value
        raise Exception('Expected exactly one value but have more')