def pretty_mode_bits(bits_str):
    """
    From a single digit representation of the bits, @p bits_str (e.g. '4'),
    produce the char array of its prettier form.
    Example:
        pretty_mode_bits(5) = ['r', '-', 'x']
    """
    pretty_bits = ['-', '-', '-']
    bit_strs = 'xwr'
    for x in range(3):
        if 1 << x & int(bits_str) != 0:
            pretty_bits[2 - x] = bit_strs[x]
    return pretty_bits
