<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_log_dir():
 """ Get a directory for logging On Linux or macOS, '/tmp/andes' is the default. On Windows, '%APPDATA%/andes' is the default. Returns ------- str Path to the logging directory """

    PATH = ''
    if platform.system() in ('Linux', 'Darwin'):
        PATH = tempfile.mkdtemp(prefix='andes-')

    elif platform.system() == 'Windows':
        APPDATA = os.getenv('APPDATA')
        PATH = os.path.join(APPDATA, 'andes')

    if not os.path.exists(PATH):
        os.makedirs(PATH)
    return PATH