def enable_ANSI_colors():
    """
    Populates the global module dictionary `ansi` with ANSI escape sequences.
    """
    global _ansi
    color_order = ['black', 'red', 'green', 'yellow', 'blue', 'purple',
        'cyan', 'white']
    short_colors = {'black': 'k', 'red': 'r', 'green': 'g', 'yellow': 'y',
        'blue': 'b', 'purple': 'p', 'cyan': 'c', 'white': 'w'}
    _ansi = {'escape': '\x1b', 'reset': 0, '|': 0, 'boldon': 1, '!': 1,
        'italicson': 3, '/': 3, 'ulon': 4, '_': 4, 'invon': 7, 'boldoff': 
        22, 'italicsoff': 23, 'uloff': 24, 'invoff': 27}
    for key in _ansi:
        if key != 'escape':
            _ansi[key] = '{0}[{1}m'.format(_ansi['escape'], _ansi[key])
    for index, color in enumerate(color_order):
        _ansi[color] = '{0}[{1}m'.format(_ansi['escape'], 30 + index)
        _ansi[color + 'f'] = _ansi[color]
        _ansi[short_colors[color] + 'f'] = _ansi[color + 'f']
    for index, color in enumerate(color_order):
        _ansi[color + 'b'] = '{0}[{1}m'.format(_ansi['escape'], 40 + index)
        _ansi[short_colors[color] + 'b'] = _ansi[color + 'b']
    _ansi['atexclimation'] = '@!'
    _ansi['atfwdslash'] = '@/'
    _ansi['atunderscore'] = '@_'
    _ansi['atbar'] = '@|'
