def write_file(path, filename, contents):
    filepath  = os.path.join(path, filename)
    try:
        os.mkdir(path)
    except __HOLE__:
        pass
    with open(filepath, 'w') as this_file:
        this_file.write(contents)
dataset/ETHPy150Open laforest/Octavo/Generator/Misc/misc.py/write_file