def add_section(self, section, values, kwargs):
    bool_yn = kwargs.get('bool_yn', False)
    if (not isinstance(bool_yn, bool)):
        raise InterpreterException('bool_yn keyword argument must be boolean')
    list_sep = kwargs.get('list_sep')
    if ((list_sep is not None) and (not isinstance(list_sep, str))):
        raise InterpreterException('list_sep keyword argument must be string')
    for (k, v) in values.items():
        if (k in self.sections[section]):
            raise InterpreterException('Summary section {!r} already have key {!r}'.format(section, k))
        formatted_values = []
        for i in listify(v):
            if (not isinstance(i, (str, int))):
                m = 'Summary value in section {!r}, key {!r}, must be string, integer or boolean'
                raise InterpreterException(m.format(section, k))
            if (bool_yn and isinstance(i, bool)):
                formatted_values.append((mlog.green('YES') if i else mlog.red('NO')))
            else:
                formatted_values.append(i)
        self.sections[section][k] = (formatted_values, list_sep)
        self.max_key_len = max(self.max_key_len, len(k))
def add_section(self, section, values, kwargs):
    bool_yn = kwargs.get('bool_yn', False)
    if (not isinstance(bool_yn, bool)):
        raise InterpreterException('bool_yn keyword argument must be boolean')
    list_sep = kwargs.get('list_sep')
    if ((list_sep is not None) and (not isinstance(list_sep, str))):
        raise InterpreterException('list_sep keyword argument must be string')
    for (k, v) in values.items():
        if (k in self.sections[section]):
            raise InterpreterException('Summary section {!r} already have key {!r}'.format(section, k))
        formatted_values = []
        for i in listify(v):
            if (not isinstance(i, (str, int))):
                m = 'Summary value in section {!r}, key {!r}, must be string, integer or boolean'
                raise InterpreterException(m.format(section, k))
            if (bool_yn and isinstance(i, bool)):
                formatted_values.append((mlog.green('YES') if i else mlog.red('NO')))
            else:
                formatted_values.append(i)
        self.sections[section][k] = (formatted_values, list_sep)
        self.max_key_len = max(self.max_key_len, len(k))