def METHOD_NAME(compiler, source, filename, symbol):
    # Check for source consisting of only blank lines and comments
    for line in source.split("\n"):
        line = line.strip()
        if line and line[0] != '#':
            break               # Leave it alone
    else:
        if symbol != "eval":
            source = "pass"     # Replace it with a 'pass' statement
    err = err1 = err2 = None
    code = code1 = code2 = None
    try:
        code = compiler(source, filename, symbol)
    except SyntaxError, err:
        pass
    try:
        code1 = compiler(source + "\n", filename, symbol)
    except SyntaxError, err1:
        pass
    try:
        code2 = compiler(source + "\n\n", filename, symbol)
    except SyntaxError, err2:
        pass
    if code:
        return code
    if not code1 and repr(err1) == repr(err2):
        raise SyntaxError, err1