def user_data_dir(appname, roaming=False):
    if WINDOWS:
        const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA"
        path = os.path.join(os.path.normpath(_get_win_folder(const)), appname)
    elif sys.platform == "darwin":
        path = os.path.join(
            os.path.expanduser('~/Library/Application Support/'),
            appname,
        )
    else:
        path = os.path.join(
            os.getenv('XDG_DATA_HOME', os.path.expanduser("~/.local/share")),
            appname,
        )

    return path
Wraps a template element to return a template.
dataset/ETHPy150Open anzev/hedwig/build/pip/pip/utils/appdirs.py/user_data_dir--crossover with--dataset/ETHPy150Open openstack/rack/rack/api/xmlutil.py/TemplateElement.wrap