def METHOD_NAME():
    import curses
    from .utils import to_ascii
    # Look up numeric capabilities.
    colors.COLS = curses.tigetnum('cols')
    colors.LINES = curses.tigetnum('lines')
    # Look up string capabilities.
    for capability in _STRING_CAPABILITIES:
        (attrib, cap_name) = capability.split('=')
        setattr(colors, attrib, _tigetstr(cap_name) or '')
    # Colors
    set_fg = _tigetstr('setf')
    if set_fg:
        for i, color in zip(list(range(len(_COLORS))), _COLORS):
            setattr(colors, color, to_ascii(curses.tparm(set_fg.encode('utf-8'), i)) or '')
    set_fg_ansi = _tigetstr('setaf')
    if set_fg_ansi:
        for i, color in zip(list(range(len(_ANSICOLORS))), _ANSICOLORS):
            setattr(colors, color, to_ascii(curses.tparm(set_fg_ansi.encode('utf-8'), i)) or '')
    set_bg = _tigetstr('setb')
    if set_bg:
        for i, color in zip(list(range(len(_COLORS))), _COLORS):
            setattr(colors, 'BG_'+color, to_ascii(curses.tparm(set_bg.encode('utf-8'), i)) or '')
    set_bg_ansi = _tigetstr('setab')
    if set_bg_ansi:
        for i, color in zip(list(range(len(_ANSICOLORS))), _ANSICOLORS):
            setattr(colors, 'BG_'+color, to_ascii(curses.tparm(set_bg_ansi.encode('utf-8'), i)) or '')