def get_user_config_dir(app_name, app_author, roaming=True, force_xdg=True):
if WIN:<EOL><INDENT>key = '<STR_LIT>' if roaming else '<STR_LIT>'<EOL>folder = os.path.expanduser(os.environ.get(key, '<STR_LIT>'))<EOL>return os.path.join(folder, app_author, app_name)<EOL><DEDENT>if MAC and not force_xdg:<EOL><INDENT>return os.path.join(os.path.expanduser(<EOL>'<STR_LIT>'), app_name)<EOL><DEDENT>return os.path.join(<EOL>os.path.expanduser(os.environ.get('<STR_LIT>', '<STR_LIT>')),<EOL>_pathify(app_name))<EOL>
Returns the config folder for the application.  The default behavior
    is to return whatever is most appropriate for the operating system.

    For an example application called ``"My App"`` by ``"Acme"``,
    something like the following folders could be returned:

    macOS (non-XDG):
      ``~/Library/Application Support/My App``
    Mac OS X (XDG):
      ``~/.config/my-app``
    Unix:
      ``~/.config/my-app``
    Windows 7 (roaming):
      ``C:\\Users\<user>\AppData\Roaming\Acme\My App``
    Windows 7 (not roaming):
      ``C:\\Users\<user>\AppData\Local\Acme\My App``

    :param app_name: the application name. This should be properly capitalized
                     and can contain whitespace.
    :param app_author: The app author's name (or company). This should be
                       properly capitalized and can contain whitespace.
    :param roaming: controls if the folder should be roaming or not on Windows.
                    Has no effect on non-Windows systems.
    :param force_xdg: if this is set to `True`, then on macOS the XDG Base
                      Directory Specification will be followed. Has no effect
                      on non-macOS systems.