def parseStringToPythonAst(text):
    lineOffsets = computeLineOffsets(text)
    try:
        pyAst = astCache_.get(text)
        if pyAst is None:
            pyAst = astCache_[text] = convertPythonAstToForaPythonAst(ast.parse(text), lineOffsets)
        return pyAst
    except SyntaxError as e:
        return ForaNative.PythonParseError(e.msg,
                                           e.filename,
                                           e.lineno,
                                           e.offset,
                                           e.text)
    except __HOLE__ as e:
        return ForaNative.PythonParseError(str(e.message))
dataset/ETHPy150Open ufora/ufora/ufora/FORA/python/PurePython/PythonAstConverter.py/parseStringToPythonAst