<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_partial(self, stream):
 """ Parse the longest possible prefix of a given string. Return a tuple of the result and the rest of the string, or raise a ParseError. """

        result = self(stream, 0)

        if result.status:
            return (result.value, stream[result.index:])
        else:
            raise ParseError(result.expected, stream, result.furthest)