def generate_multiline_list(<EOL>self,<EOL>items,               <EOL>before='<STR_LIT>',           <EOL>after='<STR_LIT>',            <EOL>delim=('<STR_LIT:(>', '<STR_LIT:)>'),    <EOL>compact=True,        <EOL>sep='<STR_LIT:U+002C>',             <EOL>skip_last_sep=False  <EOL>):<EOL>
assert len(delim) == <NUM_LIT:2> and isinstance(delim[<NUM_LIT:0>], six.text_type) andisinstance(delim[<NUM_LIT:1>], six.text_type), '<STR_LIT>'<EOL>if len(items) == <NUM_LIT:0>:<EOL><INDENT>self.emit(before + delim[<NUM_LIT:0>] + delim[<NUM_LIT:1>] + after)<EOL>return<EOL><DEDENT>if len(items) == <NUM_LIT:1>:<EOL><INDENT>self.emit(before + delim[<NUM_LIT:0>] + items[<NUM_LIT:0>] + delim[<NUM_LIT:1>] + after)<EOL>return<EOL><DEDENT>if compact:<EOL><INDENT>self.emit(before + delim[<NUM_LIT:0>] + items[<NUM_LIT:0>] + sep)<EOL>def emit_list(items):<EOL><INDENT>items = items[<NUM_LIT:1>:]<EOL>for (i, item) in enumerate(items):<EOL><INDENT>if i == len(items) - <NUM_LIT:1>:<EOL><INDENT>self.emit(item + delim[<NUM_LIT:1>] + after)<EOL><DEDENT>else:<EOL><INDENT>self.emit(item + sep)<EOL><DEDENT><DEDENT><DEDENT>if before or delim[<NUM_LIT:0>]:<EOL><INDENT>with self.indent(len(before) + len(delim[<NUM_LIT:0>])):<EOL><INDENT>emit_list(items)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>emit_list(items)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if before or delim[<NUM_LIT:0>]:<EOL><INDENT>self.emit(before + delim[<NUM_LIT:0>])<EOL><DEDENT>with self.indent():<EOL><INDENT>for (i, item) in enumerate(items):<EOL><INDENT>if i == len(items) - <NUM_LIT:1> and skip_last_sep:<EOL><INDENT>self.emit(item)<EOL><DEDENT>else:<EOL><INDENT>self.emit(item + sep)<EOL><DEDENT><DEDENT><DEDENT>if delim[<NUM_LIT:1>] or after:<EOL><INDENT>self.emit(delim[<NUM_LIT:1>] + after)<EOL><DEDENT>elif delim[<NUM_LIT:1>]:<EOL><INDENT>self.emit(delim[<NUM_LIT:1>])<EOL><DEDENT><DEDENT>
Given a list of items, emits one item per line.

This is convenient for function prototypes and invocations, as well as
for instantiating arrays, sets, and maps in some languages.

TODO(kelkabany): A backend that uses tabs cannot be used with this
    if compact is false.

Args:
    items (list[str]): Should contain the items to generate a list of.
    before (str): The string to come before the list of items.
    after (str): The string to follow the list of items.
    delim (str, str): The first element is added immediately following
        `before`. The second element is added prior to `after`.
    compact (bool): In compact mode, the enclosing parentheses are on
        the same lines as the first and last list item.
    sep (str): The string that follows each list item when compact is
        true. If compact is false, the separator is omitted for the
        last item.
    skip_last_sep (bool): When compact is false, whether the last line
        should have a trailing separator. Ignored when compact is true.