def METHOD_NAME(defines_str):
    import re
    define_re = re.compile(r"^\#define\s+([a-zA-Z0-9_]+)\s+(.*)$")
    result = []
    for line in defines_str.split("\n"):
        if not line.strip():
            continue
        match = define_re.match(line)
        if match is None:
            raise RuntimeError("#define not understood: '%s'" % line)
        result.append(
                "{} = {}".format(match.group(1), to_python_literal(match.group(2))))
    return "\n".join(result)