def check_syntax(code):
    """Return True if syntax is okay."""
    try:
        return compile(code, '<string>', 'exec')
    except (SyntaxError, TypeError, __HOLE__):
        return False
dataset/ETHPy150Open jdf/processing.py/mode/formatter/autopep8.py/check_syntax