def parse_session(lines):
    session = re.compile(r"={2,} test session starts ={2,}")

    if not session.match(lines[0]):
        return None

    m = re.match(r"rootdir: (?P<root>.*), inifile: (?P<ini>.*)$", lines[2])
    if not m:
        return None
    return m.group('root')
Parse the pytest `session` section to extract the `root dir` of the test
dataset/ETHPy150Open okcompute/vim-python-tests-runner/compiler/runners/pytest.py/parse_session