def collect_one(self, *args, **kwargs):
generator = self.collect(*args, **kwargs)<EOL>try:<EOL><INDENT>value = next(generator)<EOL><DEDENT>except StopIteration:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>next(generator)<EOL><DEDENT>except StopIteration:<EOL><INDENT>return value<EOL><DEDENT>raise Exception('<STR_LIT>')<EOL>
Same as `collect` but expects to have only one result.

        :return: the only result directly, not the generator like `collect`.