def METHOD_NAME(self, line):
    if self.state == State.findGoroutine:
        if line.startswith('goroutine'):
            self.processGoroutineLine(line)
        # Otherwise, still searching...
    elif self.state == State.getFunction:
        self.processFunctionLine(line)
    elif self.state == State.getFile:
        self.processFileLine(line)
    elif self.state == State.fileEnd:
        # Blank line indicates end of this goroutine
        if not line:
            self.finishGoroutine(True)
        # Non-blank line starting with 'goroutine' indicates start of next goroutine
        elif line.startswith('goroutine'):
            self.finishGoroutine(True)
            self.processGoroutineLine(line)
        # Other non-blank line should be another stack frame
        else:
            self.state == State.getFunction
            self.processFunctionLine(line)