def METHOD_NAME(path):
    # Python 2/3 compatibility. io.open() is available on both, but makes
    # write() expect 'unicode' strings on Python 2.
    if sys.version_info[0] < 3:
        return open(path, "w")
    return open(path, "w", encoding="utf-8")