<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def random_chars(number):
 """Generate random characters"""

    char_map = {
        k: v for k, v in chars.CHARS.iteritems()
        if not format_character(k).startswith('\\x')
    }

    char_num = sum(char_map.values())
    return (
        format_character(nth_char(char_map, random.randint(0, char_num - 1)))
        for _ in xrange(0, number)
    )