<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_output(line='0', short=None, name=None, value=None, is_parent=False, colorize=True):
 """ The function for formatting CLI output results. Args: line (:obj:`str`):
 The line number (0-4). Determines indentation. Defaults to '0'. short (:obj:`str`):
 The optional abbreviated name for a field. See hr.py for values. name (:obj:`str`):
 The optional name for a field. See hr.py for values. value (:obj:`str`):
 The field data (required). is_parent (:obj:`bool`):
 Set to True if the field value has sub-items (dicts/lists). Defaults to False. colorize (:obj:`bool`):
 Colorize the console output with ANSI colors. Defaults to True. Returns: str: The generated output. """


    # TODO: so ugly
    output = '{0}{1}{2}{3}{4}{5}{6}{7}\n'.format(
        LINES['{0}{1}'.format(line, 'C' if colorize else '')] if (
            line in LINES.keys()) else '',
        COLOR_DEPTH[line] if (colorize and line in COLOR_DEPTH) else '',
        ANSI['b'],
        short if short is not None else (
            name if (name is not None) else ''
        ),
        '' if (name is None or short is None) else ' ({0})'.format(
            name),
        '' if (name is None and short is None) else ': ',
        ANSI['end'] if colorize else '',
        '' if is_parent else value
    )

    return output