def write_flag(flag_location, flag_value):
    """ Writes a binary flag """
    flag_location = os.path.join(SETUP_DIR, flag_location)
    try:
        with open(flag_location, "w") as handle:
            handle.write("1" if flag_value else "0")
    except __HOLE__ as msg:
        error("Failed to write flag to "+ flag_location + ", reason: " + str(msg))
dataset/ETHPy150Open tobspr/RenderPipeline/setup.py/write_flag