def METHOD_NAME(lines: list[str], lnum: int) -> tuple[list[str], int]:
    # First parse the doc-string
    doclines: list[str] = []
    lnumorig = lnum
    while True:
        if lnum > len(lines) - 1:
            raise RuntimeError(
                f'No end found for enum docstr line {lnumorig + 1}.'
            )
        if lines[lnum].startswith('enum class '):
            break
        if not lines[lnum].startswith('///'):
            raise RuntimeError(f'Invalid docstr at line {lnum + 1}.')
        doclines.append(lines[lnum][4:])
        lnum += 1
    return doclines, lnum